Public Member Functions | |
add_user ($user) | |
Adds an user to to array. | |
find_host_bot () | |
Finds this bot on this channel ("host_bot"). | |
find_irc_op () | |
Finds IRC operators on this channel. | |
find_mode ($mode, $plus) | |
Finds users with/out some mode on this channel. | |
find_unknown () | |
Finds unknown users on this channel ("host_unknown"). | |
find_user_nick ($nick, $ignore_case) | |
Finds user as nick on this channel. | |
find_users_name ($name, $want_online, $want_offline, $ignore_case) | |
Finds user(s) as name on this channel. | |
init ($name, $bans, $exceptions, $invites, $reops) | |
Initialization. | |
Public Attributes | |
$bans | |
Array of ban masks. | |
$exceptions | |
Array of exceptions (to bans). | |
$invites | |
Array of invites. | |
$key | |
Key for the channel, or an empty string. | |
$limit | |
Limit for the channel as string, or an empty string for none. | |
$mode | |
String with modes (e.g. "nt") NB: There is no '+' at the beginning! | |
$name | |
Channel name. | |
$reops | |
Array of reop hints (IRCnet-specific). | |
$topic | |
Channel's topic. | |
$users | |
Array of c_user. |
Definition at line 168 of file library_php_2.inc.php.
|
Adds an user to to array.
Definition at line 210 of file library_php_2.inc.php. 00211 { 00212 foreach($this->users as $e) 00213 if($e->nick==$user->nick) 00214 return; 00215 array_push($this->users,$user); 00216 }
|
|
Finds this bot on this channel ("host_bot").
Definition at line 304 of file library_php_2.inc.php. 00305 { 00306 $res=array(); 00307 foreach($this->users as $e) { 00308 if($e->host_bot) 00309 array_push($res,$e); 00310 } 00311 return $res; 00312 }
|
|
Finds IRC operators on this channel.
Definition at line 269 of file library_php_2.inc.php. 00270 { 00271 $res=array(); 00272 foreach($this->users as $e) { 00273 if($e->irc_op) 00274 array_push($res,$e); 00275 } 00276 return $res; 00277 }
|
|
Finds users with/out some mode on this channel.
Definition at line 323 of file library_php_2.inc.php. 00324 { 00325 if(strlen($mode)!=1) { 00326 echo "Error: c_channel::find_mode() argument \$mode should be string one-character long. It is: \"".$mode."\"\n"; 00327 return array(); 00328 } 00329 $res=array(); 00330 foreach($this->users as $e) { 00331 if(($plus && strpos($e->mode,$mode)!==FALSE) || (!$plus && strpos($e->mode,$mode)===FALSE)) 00332 array_push($res,$e); 00333 } 00334 return $res; 00335 }
|
|
Finds unknown users on this channel ("host_unknown").
Definition at line 286 of file library_php_2.inc.php. 00287 { 00288 $res=array(); 00289 foreach($this->users as $e) { 00290 if($e->host_unknown) 00291 array_push($res,$e); 00292 } 00293 return $res; 00294 }
|
|
Finds user as nick on this channel.
Definition at line 253 of file library_php_2.inc.php. 00254 { 00255 foreach($this->users as $e) { 00256 if((!$ignore_case && $e->nick==$nick) || ($ignore_case && strtolower($e->nick)==strtolower($nick))) 00257 return $e; 00258 } 00259 return NULL; 00260 }
|
|
Finds user(s) as name on this channel.
Definition at line 229 of file library_php_2.inc.php. References $name. 00230 { 00231 if(!$want_online && !$want_offline) { 00232 echo "Warning: ".__CLASS__."::".__FUNCTION__."() three-state logic issue: Do we want online, offline, or both? You want none!\n"; 00233 return array(); // optimization: it is not needed to continue 00234 } 00235 $res=array(); 00236 foreach($this->users as $e) { 00237 if((($want_online && $e->online) || ($want_offline && !$e->online)) && ((!$ignore_case && $e->name==$name) || ($ignore_case && strtolower($e->name)==strtolower($name)))) 00238 array_push($res,$e); 00239 } 00240 return $res; 00241 }
|
|
Initialization.
Definition at line 192 of file library_php_2.inc.php. References $bans, $exceptions, $invites, $name, and $reops. 00193 { 00194 $this->name=$name; 00195 $this->users=array(); 00196 $this->bans=$bans; 00197 $this->exceptions=$exceptions; 00198 $this->invites=$invites; 00199 $this->reops=$reops; 00200 }
|
|
Array of ban masks.
Definition at line 171 of file library_php_2.inc.php. Referenced by init(). |
|
Array of exceptions (to bans).
Definition at line 172 of file library_php_2.inc.php. Referenced by init(). |
|
Array of invites.
Definition at line 173 of file library_php_2.inc.php. Referenced by init(). |
|
Key for the channel, or an empty string.
Definition at line 176 of file library_php_2.inc.php. |
|
Limit for the channel as string, or an empty string for none.
Definition at line 177 of file library_php_2.inc.php. |
|
String with modes (e.g. "nt") NB: There is no '+' at the beginning!
Definition at line 178 of file library_php_2.inc.php. |
|
Channel name.
Definition at line 169 of file library_php_2.inc.php. Referenced by find_users_name(), and init(). |
|
Array of reop hints (IRCnet-specific).
Definition at line 174 of file library_php_2.inc.php. Referenced by init(). |
|
Channel's topic.
Definition at line 179 of file library_php_2.inc.php. |
|
Array of c_user.
Definition at line 170 of file library_php_2.inc.php. |