PHP Класс Phergie_Plugin_UserInfo, phergie

Автор: Phergie Development Team ([email protected])
Наследование: extends Phergie_Plugin_Abstract
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$store array An array containing all the user information for a given channel

Открытые методы

Метод Описание
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.

Описание методов

getChannels() публичный Метод

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)
Результат array | boolean

getRandomUser() публичный Метод

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.
Результат string | boolean

getUsers() публичный Метод

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
Результат array | boolean

is() публичный Метод

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
Результат boolean

isAdmin() публичный Метод

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
Результат boolean

isHalfop() публичный Метод

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
Результат boolean

isIn() публичный Метод

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
Результат boolean

isOp() публичный Метод

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
Результат boolean

isOwner() публичный Метод

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
Результат boolean

isVoice() публичный Метод

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
Результат boolean

onJoin() публичный Метод

Tracks users joining a channel
public onJoin ( ) : void
Результат void

onMode() публичный Метод

Tracks mode changes
public onMode ( ) : void
Результат void

onNick() публичный Метод

Tracks users changing nicks
public onNick ( ) : void
Результат void

onPart() публичный Метод

Tracks users leaving a channel
public onPart ( ) : void
Результат void

onPrivmsg() публичный Метод

Debugging function
public onPrivmsg ( ) : void
Результат void

onQuit() публичный Метод

Tracks users quitting a server
public onQuit ( ) : void
Результат void

onResponse() публичный Метод

Populates the internal user listing for a channel when the bot joins it.
public onResponse ( ) : void
Результат void

Описание свойств

$store защищенное свойство

An array containing all the user information for a given channel
protected array $store
Результат array