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 189 of file library_php_2.inc.php.
|
Adds an user to to array.
Definition at line 231 of file library_php_2.inc.php. 00232 { 00233 foreach($this->users as $e) 00234 if($e->nick==$user->nick) 00235 return; 00236 array_push($this->users,$user); 00237 }
|
|
Finds this bot on this channel ("host_bot").
Definition at line 325 of file library_php_2.inc.php. 00326 { 00327 $res=array(); 00328 foreach($this->users as $e) { 00329 if($e->host_bot) 00330 array_push($res,$e); 00331 } 00332 return $res; 00333 }
|
|
Finds IRC operators on this channel.
Definition at line 290 of file library_php_2.inc.php. 00291 { 00292 $res=array(); 00293 foreach($this->users as $e) { 00294 if($e->irc_op) 00295 array_push($res,$e); 00296 } 00297 return $res; 00298 }
|
|
Finds users with/out some mode on this channel.
Definition at line 344 of file library_php_2.inc.php. 00345 { 00346 if(strlen($mode)!=1) { 00347 echo "Error: c_channel::find_mode() argument \$mode should be string one-character long. It is: \"".$mode."\"\n"; 00348 return array(); 00349 } 00350 $res=array(); 00351 foreach($this->users as $e) { 00352 if(($plus && strpos($e->mode,$mode)!==FALSE) || (!$plus && strpos($e->mode,$mode)===FALSE)) 00353 array_push($res,$e); 00354 } 00355 return $res; 00356 }
|
|
Finds unknown users on this channel ("host_unknown").
Definition at line 307 of file library_php_2.inc.php. 00308 { 00309 $res=array(); 00310 foreach($this->users as $e) { 00311 if($e->host_unknown) 00312 array_push($res,$e); 00313 } 00314 return $res; 00315 }
|
|
Finds user as nick on this channel.
Definition at line 274 of file library_php_2.inc.php. 00275 { 00276 foreach($this->users as $e) { 00277 if((!$ignore_case && $e->nick==$nick) || ($ignore_case && strtolower($e->nick)==strtolower($nick))) 00278 return $e; 00279 } 00280 return NULL; 00281 }
|
|
Finds user(s) as name on this channel.
Definition at line 250 of file library_php_2.inc.php. References $name. 00251 { 00252 if(!$want_online && !$want_offline) { 00253 echo "Warning: ".__CLASS__."::".__FUNCTION__."() three-state logic issue: Do we want online, offline, or both? You want none!\n"; 00254 return array(); // optimization: it is not needed to continue 00255 } 00256 $res=array(); 00257 foreach($this->users as $e) { 00258 if((($want_online && $e->online) || ($want_offline && !$e->online)) && ((!$ignore_case && $e->name==$name) || ($ignore_case && strtolower($e->name)==strtolower($name)))) 00259 array_push($res,$e); 00260 } 00261 return $res; 00262 }
|
|
Initialization.
Definition at line 213 of file library_php_2.inc.php. References $bans, $exceptions, $invites, $name, and $reops. 00214 { 00215 $this->name=$name; 00216 $this->users=array(); 00217 $this->bans=$bans; 00218 $this->exceptions=$exceptions; 00219 $this->invites=$invites; 00220 $this->reops=$reops; 00221 }
|
|
Array of ban masks.
Definition at line 192 of file library_php_2.inc.php. Referenced by init(). |
|
Array of exceptions (to bans).
Definition at line 193 of file library_php_2.inc.php. Referenced by init(). |
|
Array of invites.
Definition at line 194 of file library_php_2.inc.php. Referenced by init(). |
|
Key for the channel, or an empty string.
Definition at line 197 of file library_php_2.inc.php. |
|
Limit for the channel as string, or an empty string for none.
Definition at line 198 of file library_php_2.inc.php. |
|
String with modes (e.g. "nt") NB: There is no '+' at the beginning!
Definition at line 199 of file library_php_2.inc.php. |
|
Channel name.
Definition at line 190 of file library_php_2.inc.php. Referenced by find_users_name(), and init(). |
|
Array of reop hints (IRCnet-specific).
Definition at line 195 of file library_php_2.inc.php. Referenced by init(). |
|
Channel's topic.
Definition at line 200 of file library_php_2.inc.php. |
|
Array of c_user.
Definition at line 191 of file library_php_2.inc.php. |