PHP Class Phergie_Plugin_UserInfo, phergie

Inheritance: extends Phergie_Plugin_Abstract
Afficher le fichier Open project: phergie/phergie

Protected Properties

Свойство Type Description
$store array An array containing all the user information for a given channel

Méthodes publiques

Méthode Description
getChannels ( string $nick = null ) : array | boolean Returns a list of channels in which a given user is present.
getRandomUser ( string $chan, array $ignore = ['chanserv'] ) : string | boolean Returns the nick of a random user present in a given channel or false if the bot is not present in the channel.
getUsers ( string $chan ) : array | boolean Returns the entire user list for a channel or false if the bot is not in the channel.
is ( integer $mode, string $nick, string $chan ) : boolean Checks whether or not a given user has a mode
isAdmin ( string $nick, string $chan ) : boolean Checks whether or not a given user has admin (&) status
isHalfop ( string $nick, string $chan ) : boolean Checks whether or not a given user has halfop (%) status
isIn ( string $nick, string $chan ) : boolean Checks whether or not a given user is in a channel
isOp ( string $nick, string $chan ) : boolean Checks whether or not a given user has operator (@) status
isOwner ( string $nick, string $chan ) : boolean Checks whether or not a given user has owner (~) status
isVoice ( string $nick, string $chan ) : boolean Checks whether or not a given user has voice (+) status
onJoin ( ) : void Tracks users joining a channel
onMode ( ) : void Tracks mode changes
onNick ( ) : void Tracks users changing nicks
onPart ( ) : void Tracks users leaving a channel
onPrivmsg ( ) : void Debugging function
onQuit ( ) : void Tracks users quitting a server
onResponse ( ) : void Populates the internal user listing for a channel when the bot joins it.

Method Details

getChannels() public méthode

Returns a list of channels in which a given user is present.
public getChannels ( string $nick = null ) : array | boolean
$nick string Nick of the user (optional, defaults to the bot's nick)
Résultat array | boolean

getRandomUser() public méthode

To exclude the bot's current nick, for example: $chan = $this->getEvent()->getSource(); $current_nick = $this->getConnection()->getNick(); $random_user = $this->plugins->getPlugin('UserInfo') ->getRandomUser( $chan, array( $current_nick ) );
public getRandomUser ( string $chan, array $ignore = ['chanserv'] ) : string | boolean
$chan string The channel name
$ignore array A list of nicks to ignore in the channel. Useful for excluding the bot itself.
Résultat string | boolean

getUsers() public méthode

Returns the entire user list for a channel or false if the bot is not in the channel.
public getUsers ( string $chan ) : array | boolean
$chan string The channel name
Résultat array | boolean

is() public méthode

Checks whether or not a given user has a mode
public is ( integer $mode, string $nick, string $chan ) : boolean
$mode integer A numeric mode (identified by the class constants)
$nick string The nick to check
$chan string The channel to check in
Résultat boolean

isAdmin() public méthode

Checks whether or not a given user has admin (&) status
public isAdmin ( string $nick, string $chan ) : boolean
$nick string The nick to check
$chan string The channel to check in
Résultat boolean

isHalfop() public méthode

Checks whether or not a given user has halfop (%) status
public isHalfop ( string $nick, string $chan ) : boolean
$nick string The nick to check
$chan string The channel to check in
Résultat boolean

isIn() public méthode

Checks whether or not a given user is in a channel
public isIn ( string $nick, string $chan ) : boolean
$nick string The nick to check
$chan string The channel to check in
Résultat boolean

isOp() public méthode

Checks whether or not a given user has operator (@) status
public isOp ( string $nick, string $chan ) : boolean
$nick string The nick to check
$chan string The channel to check in
Résultat boolean

isOwner() public méthode

Checks whether or not a given user has owner (~) status
public isOwner ( string $nick, string $chan ) : boolean
$nick string The nick to check
$chan string The channel to check in
Résultat boolean

isVoice() public méthode

Checks whether or not a given user has voice (+) status
public isVoice ( string $nick, string $chan ) : boolean
$nick string The nick to check
$chan string The channel to check in
Résultat boolean

onJoin() public méthode

Tracks users joining a channel
public onJoin ( ) : void
Résultat void

onMode() public méthode

Tracks mode changes
public onMode ( ) : void
Résultat void

onNick() public méthode

Tracks users changing nicks
public onNick ( ) : void
Résultat void

onPart() public méthode

Tracks users leaving a channel
public onPart ( ) : void
Résultat void

onPrivmsg() public méthode

Debugging function
public onPrivmsg ( ) : void
Résultat void

onQuit() public méthode

Tracks users quitting a server
public onQuit ( ) : void
Résultat void

onResponse() public méthode

Populates the internal user listing for a channel when the bot joins it.
public onResponse ( ) : void
Résultat void

Property Details

$store protected_oe property

An array containing all the user information for a given channel
protected array $store
Résultat array