Constructor.
create a new chat object
void
Chat
([mixed $name = CHAT_NAME], mixed $supported_languages, string $channel)
Checks if given channel name exists
boolean
channel_exists
(string $channel)
Checks if an URL exists
boolean
check_URL
(string $url, [mixed $checkIMG = true])
Sets the confirm code to null
boolean
confirm
(string $code)
Connect to the database
Establish a database connection
boolean
connect
()
Creates a channel (default, moderated)
void
create_channel
(string $name, integer $type, mixed $passwd, mixed $message)
-
string
$name
-
integer
$type
Creates a private channel
void
create_private_channel
(string $channel_name)
Deletes a channel
boolean
delete_channel
(string $channel_name)
Disconnect the database
void
disconnect
()
void
get_best_chatter
(mixed $grade, mixed $limit)
Gets all the channels
array
get_channels
()
Gets all the channels as an option list specially for select boxes in the chat
string
get_channels_option_list
([int $current_channel = ''])
Gets all chatters in given channel
array
get_channel_chatters
(string $channel)
-
string
$channel: name of channel
Gets all chatters in given channel as an option list
string
get_channel_chatters_option_list
(string $channel)
-
string
$channel: name of channel
Provides the channel of given chatter
string
get_channel_of
(string; $nickname)
-
string;
$nickname: nickname of a chatter
Gets all chatters
array
get_chatters
([mixed $channel = null], [mixed $search_query = ''])
Provides an array of chatters
array
get_chatters_excepting
(array $chatters_to_skip, [boolean $as_option_list = null], [string $channel = null])
-
array
$chatters_to_skip
-
boolean
$as_option_list
-
string
$channel
Provides the count of chatters in given channel
array
get_chatter_count
(string $channel)
-
string
$channel: name of channel
Provides a chatter instance if exists
object
get_chatter_instance
(string $nick)
Provides the default language of the chat
string
get_default_language
()
Gets all friends in given channel as an option list
string
get_friends_option_list
(string $channel)
-
string
$channel: name of channel
void
get_grade_icon
(mixed $nick)
Gets all guests in given channel as an option list
string
get_guests_option_list
()
Gets language of the chat
string
get_language
()
Provides the count of registered chatters
array
get_last_registered
()
Provides the count of mails in the DB
integer
get_mail_count
()
Provides the count of mails in the DB from the last 24h
integer
get_mail_count_last_24h
()
Provides a note about a given chatter
string
get_note_for
(mixed $nickname)
Provides a list of online chatters
array
get_online_chatter
()
Gets a list of chatters online in fromat:
(nickname)(unixtimestamp)(channel)\n
string
get_online_chatters_list
([mixed $unix_timestamp = true])
Provides the count of online chatters
integer
get_online_count
()
Provides the count of chatters online in the last 24h
integer
get_online_count_last24h
()
Provides the avg.
of online time per chatter in seconds per day
double
get_online_time_avg
()
Gets all private channels
array
get_private_channels
()
Gets all private channels as an option list specially for select boxes in the chat
string
get_private_channels_option_list
([int $current_channel = ''])
Gets referer
string
get_referer
()
Provides the count of registered chatters
integer
get_registered_count
()
Provides the show profile flag
boolean
get_show_profile
()
Returns a parsed template
string
get_template
(string $template, [mixed $inline = null])
void
get_template_from_cache
(mixed $cacheId)
Gets all chatters in given channel as an option list of unignored users of current chatter
array
get_unignored_chatters_option_list
(string $channel, [string $nick_constraint = ''])
-
string
$channel: nickname
-
string
$nick_constraint: name of channel
Method to perform an HTTP POST to a web page from a PHP script.
Example: http_post( "www.foo.com", 80, "/check.php", array("name" => "foo", "age" => "20") );
mixed
http_post
(string $server, integer $port, mixed $url, mixed $vars)
-
string
$server: server to post to
-
integer
$port: server post, mostly port 80
initialisation of channel_buffers
void
init_channel_buffers
()
Checks if a given nickname is online
boolean
is_online
(string $nick)
Logout a chatter
void
logout
()
Cleans up online status of chatters
void
make_clean
()
Creates a new instance of class channel within session
boolean
mkinstance_channel
(mixed $post_channel)
Creates a new instance of class chatter
mixed
mkinstance_chatter
(string; $post_nickname, [mixed $force = false])
-
string;
$post_nickname: a nickname of a chatter
void
move_channel_to_top
(mixed $channel)
void
put_template_into_cache
(mixed $cacheId, mixed $content, mixed $period)
Sets dethless chatters
void
set_deathless_chatters
(array $deathless_chatters)
-
array
$deathless_chatters
Sets primary language prefix of the chat
void
set_language
(string $primary_lang_prefix)
-
string
$primary_lang_prefix
void
set_nick_restrict
(mixed $restrict)
void
set_note_for
(mixed $nickname, mixed $note)
void
set_operator_passwd
()
Sets referer
void
set_referer
(string $referer)
Sets the show profile flag
void
set_show_profile
([boolean $bool = true])
Test class Chat
call like: Chat::test();
void
test
()
Creates a channel (default, moderated)
void
update_channel
(string $name, integer $type, mixed $passwd, mixed $message)
-
string
$name
-
integer
$type
Writes a message from the system-bot to given recipient
boolean
write_sys_msg
(string; $message, object; $recipient, [mixed $whispered = false])
-
string;
$message: message to write
-
object;
$recipient: recipient
void
_check_flag
(mixed $lang)