Class Chat

Description

Chat describes the whole chat

Chat describes the whole chat

  • version: $Id: class.Chat.inc,v 1.91 2004/05/27 09:17:57 jjaeschke Exp $
  • access: public
  • author: Michael Oertel <michael@ortelius.de>

Located in /include/class.Chat.inc (line 51)


	
			
Variable Summary
Method Summary
 Chat Chat ([mixed $name = CHAT_NAME], mixed $supported_languages, string $channel)
 void alter_db_schema ()
 boolean channel_exists (string $channel)
 string check ()
 void check_php_version (mixed $version)
 boolean check_URL (string $url, [mixed $checkIMG = true])
 boolean confirm (string $code)
 boolean connect ()
 boolean create_channel (string $name, integer $type, mixed $passwd, mixed $message)
 void create_private_channel (string $channel_name)
 boolean delete_channel (string $channel_name)
 void disconnect ()
 void display_error ([mixed $errmsg = ''], [mixed $filename = ''], mixed $poc_error_msg)
 void get_best_chatter (mixed $grade, mixed $limit, [mixed $order = "online_time"])
 array get_channels ()
 string get_channels_option_list ([int $current_channel = ''])
 array get_channel_chatters (string $channel)
 string get_channel_chatters_option_list (string $channel)
 string get_channel_of (string; $nickname)
 array get_chatters ([mixed $channel = null], [mixed $search_query = ''])
 array get_chatters_excepting (array $chatters_to_skip, [boolean $as_option_list = null], [string $channel = null])
 array get_chatter_count (string $channel)
 object get_chatter_instance (string $nick)
 string get_friends_option_list (string $channel)
 void get_grade_icon (mixed $nick)
 array get_group_members (string $group, mixed $channel, [mixed $only_present = false])
 string get_language ()
 void get_lang_switch ()
 integer get_mail_count ()
 string get_note_for (mixed $nickname)
 string get_online_chatters_list ([mixed $unix_timestamp = true])
 integer get_online_count ()
 string get_private_channels_option_list ([int $current_channel = ''])
 string get_referer ()
 boolean get_show_profile ()
 string get_template (string $template, [mixed $inline = null])
 void get_template_from_cache (mixed $cacheId)
 array get_traffic (mixed $time_type)
 array get_unignored_chatters_option_list (string $channel, [string $nick_constraint = ''])
 mixed http_post (string $server, integer $port, mixed $url, mixed $vars)
 string is_away (string $nick)
 boolean is_online (string $nick)
 void is_registered (mixed $nickname)
 void logout ()
 void log_traffic (mixed $in, mixed $out)
 void make_clean ()
 boolean mkinstance_channel (mixed $post_channel)
 mixed mkinstance_chatter (string; $post_nickname, [mixed $force = false])
 void move_channel_to_top (mixed $channel)
 void put_template_into_cache (mixed $cacheId, mixed $content, mixed $period)
 void set_deathless_chatters (array $deathless_chatters)
 void set_language (string $primary_lang_prefix)
 void set_nick_restrict (mixed $restrict)
 void set_note_for (mixed $nickname, mixed $note)
 void set_referer (string $referer)
 void set_show_profile ([boolean $bool = true])
 void test ()
 void update_channel (string $name, integer $type, mixed $passwd, mixed $message)
 boolean write_js_update (string; $message, [object; $recipient = null])
 boolean write_sys_msg (string; $message, object; $recipient, [mixed $whispered = false], [mixed $hidden = false])
 void _check_flag (mixed $lang)
Variables
integer $connection_count = 0 (line 65)
array $deathless_chatters = array() (line 95)

nicknames which will never die

nicknames which will never die

string $language = '' (line 71)

Interface language of chat

Interface language of chat

string $name = '' (line 58)
string $referer = '' (line 83)

referer

referer

string $restrict = '' (line 77)

search string for nicknames

search string for nicknames

boolean $show_profile = true (line 89)

show profile flag

show profile flag

array $supported_languages = array() (line 101)

all supported languages

all supported languages

Methods
Constructor Chat (line 111)

Constructor.

Constructor. create a new chat object

  • access: public
Chat Chat ([mixed $name = CHAT_NAME], mixed $supported_languages, string $channel)
  • string $channel
alter_db_schema (line 1557)
void alter_db_schema ()
channel_exists (line 823)

Checks if given channel name exists

Checks if given channel name exists

  • access: public
boolean channel_exists (string $channel)
  • string $channel
check (line 1667)

Checks installation of poc

Checks installation of poc

string check ()
check_php_version (line 2055)
void check_php_version (mixed $version)
check_URL (line 1289)

Checks if an URL exists

Checks if an URL exists

  • access: public
boolean check_URL (string $url, [mixed $checkIMG = true])
  • string $url
confirm (line 413)

Sets the confirm code to null

Sets the confirm code to null

  • access: public
boolean confirm (string $code)
  • string $code
connect (line 261)

Connect to the database

Connect to the database Establish a database connection

  • access: public
boolean connect ()
create_channel (line 496)

Creates a channel (default, moderated)

Creates a channel (default, moderated)

  • access: public
boolean create_channel (string $name, integer $type, mixed $passwd, mixed $message)
  • string $name
  • integer $type
create_private_channel (line 461)

Creates a private channel

Creates a private channel

  • access: public
void create_private_channel (string $channel_name)
  • string $channel_name
delete_channel (line 583)

Deletes a channel

Deletes a channel

  • access: public
boolean delete_channel (string $channel_name)
  • string $channel_name
disconnect (line 396)

Disconnect the database

Disconnect the database

void disconnect ()
display_error (line 2035)
void display_error ([mixed $errmsg = ''], [mixed $filename = ''], mixed $poc_error_msg)
get_best_chatter (line 1162)
void get_best_chatter (mixed $grade, mixed $limit, [mixed $order = "online_time"])
get_channels (line 794)

Gets all the channels

Gets all the channels

  • access: public
array get_channels ()
get_channels_option_list (line 657)

Gets all the channels as an option list specially for select boxes in the chat

Gets all the channels as an option list specially for select boxes in the chat

  • access: public
string get_channels_option_list ([int $current_channel = ''])
  • int $current_channel
get_channel_chatters (line 913)

Gets all chatters in given channel

Gets all chatters in given channel

  • access: public
array get_channel_chatters (string $channel)
  • string $channel: name of channel
get_channel_chatters_option_list (line 965)

Gets all chatters in given channel as an option list

Gets all chatters in given channel as an option list

  • access: public
string get_channel_chatters_option_list (string $channel)
  • string $channel: name of channel
get_channel_of (line 1737)

Provides the channel of given chatter

Provides the channel of given chatter

string get_channel_of (string; $nickname)
  • string; $nickname: nickname of a chatter
get_chatters (line 1250)

Gets all chatters

Gets all chatters

  • access: public
array get_chatters ([mixed $channel = null], [mixed $search_query = ''])
get_chatters_excepting (line 1128)

Provides an array of chatters

Provides an array of chatters

  • access: public
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
get_chatter_count (line 944)

Provides the count of chatters in given channel

Provides the count of chatters in given channel

  • access: public
array get_chatter_count (string $channel)
  • string $channel: name of channel
get_chatter_instance (line 1227)

Provides a chatter instance if exists

Provides a chatter instance if exists

object get_chatter_instance (string $nick)
  • string $nick
get_default_language (line 150)

Provides the default language of the chat

Provides the default language of the chat

  • access: public
string get_default_language ()
get_friends_option_list (line 1032)

Gets all friends in given channel as an option list

Gets all friends in given channel as an option list

  • access: public
string get_friends_option_list (string $channel)
  • string $channel: name of channel
get_grade_icon (line 1931)
void get_grade_icon (mixed $nick)
get_group_members (line 1186)

Provides all members of given group name

Provides all members of given group name

array get_group_members (string $group, mixed $channel, [mixed $only_present = false])
  • string $group
get_guests_option_list (line 1063)

Gets all guests in given channel as an option list

Gets all guests in given channel as an option list

  • access: public
string get_guests_option_list ()
get_language (line 139)

Gets language of the chat

Gets language of the chat

  • return: interface language of chat
  • access: public
string get_language ()
get_lang_switch (line 165)
void get_lang_switch ()
get_last_registered (line 1859)

Provides the count of registered chatters

Provides the count of registered chatters

array get_last_registered ()
get_mail_count (line 1824)

Provides the count of mails in the DB

Provides the count of mails in the DB

integer get_mail_count ()
get_mail_count_last_24h (line 1841)

Provides the count of mails in the DB from the last 24h

Provides the count of mails in the DB from the last 24h

integer get_mail_count_last_24h ()
get_note_for (line 1876)

Provides a note about a given chatter

Provides a note about a given chatter

string get_note_for (mixed $nickname)
get_online_chatter (line 1716)

Provides a list of online chatters

Provides a list of online chatters

array get_online_chatter ()
get_online_chatters_list (line 1691)

Gets a list of chatters online in fromat:

Gets a list of chatters online in fromat:
(nickname)(unixtimestamp)(channel)\n

string get_online_chatters_list ([mixed $unix_timestamp = true])
get_online_count (line 1751)

Provides the count of online chatters

Provides the count of online chatters

integer get_online_count ()
get_online_count_last24h (line 1770)

Provides the count of chatters online in the last 24h

Provides the count of chatters online in the last 24h

integer get_online_count_last24h ()
get_online_time_avg (line 1790)

Provides the avg.

Provides the avg. of online time per chatter in seconds per day

double get_online_time_avg ()
get_private_channels (line 841)

Gets all private channels

Gets all private channels

  • access: public
array get_private_channels ()
get_private_channels_option_list (line 762)

Gets all private channels as an option list specially for select boxes in the chat

Gets all private channels as an option list specially for select boxes in the chat

  • access: public
string get_private_channels_option_list ([int $current_channel = ''])
  • int $current_channel
get_referer (line 204)

Gets referer

Gets referer

  • access: public
string get_referer ()
get_registered_count (line 1807)

Provides the count of registered chatters

Provides the count of registered chatters

integer get_registered_count ()
get_show_profile (line 237)

Provides the show profile flag

Provides the show profile flag

  • access: public
boolean get_show_profile ()
get_template (line 1373)

Returns a parsed template

Returns a parsed template

string get_template (string $template, [mixed $inline = null])
  • string $template
get_template_from_cache (line 1970)
void get_template_from_cache (mixed $cacheId)
get_traffic (line 1503)

Provides HTTP traffic information

Provides HTTP traffic information

array get_traffic (mixed $time_type)
get_unignored_chatters_option_list (line 1091)

Gets all chatters in given channel as an option list of unignored users of current chatter

Gets all chatters in given channel as an option list of unignored users of current chatter

  • access: public
array get_unignored_chatters_option_list (string $channel, [string $nick_constraint = ''])
  • string $channel: nickname
  • string $nick_constraint: name of channel
http_post (line 1998)

Method to perform an HTTP POST to a web page from a PHP script.

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
init_channel_buffers (line 616)

initialisation of channel_buffers

initialisation of channel_buffers

void init_channel_buffers ()
is_away (line 892)

Checks if user is away

Checks if user is away

  • since: POC version-3.1.0
string is_away (string $nick)
  • string $nick
is_online (line 862)

Checks if a given nickname is online

Checks if a given nickname is online

boolean is_online (string $nick)
  • string $nick
is_registered (line 872)
void is_registered (mixed $nickname)
logout (line 1392)

Logout a chatter

Logout a chatter

void logout ()
log_traffic (line 1465)

Logs HTTP traffic

Logs HTTP traffic

void log_traffic (mixed $in, mixed $out)
make_clean (line 1591)

Cleans up online status of chatters

Cleans up online status of chatters

void make_clean ()
mkinstance_channel (line 284)

Creates a new instance of class channel within session

Creates a new instance of class channel within session

  • access: public
boolean mkinstance_channel (mixed $post_channel)
mkinstance_chatter (line 300)

Creates a new instance of class chatter

Creates a new instance of class chatter

  • access: public
mixed mkinstance_chatter (string; $post_nickname, [mixed $force = false])
  • string; $post_nickname: a nickname of a chatter
move_channel_to_top (line 632)
void move_channel_to_top (mixed $channel)
put_template_into_cache (line 1944)
void put_template_into_cache (mixed $cacheId, mixed $content, mixed $period)
setup_output_template (line 1328)
void setup_output_template ()
set_deathless_chatters (line 248)

Sets dethless chatters

Sets dethless chatters

  • access: public
void set_deathless_chatters (array $deathless_chatters)
  • array $deathless_chatters
set_language (line 193)

Sets primary language prefix of the chat

Sets primary language prefix of the chat

  • access: public
void set_language (string $primary_lang_prefix)
  • string $primary_lang_prefix
set_nick_restrict (line 1114)
void set_nick_restrict (mixed $restrict)
set_note_for (line 1888)
void set_note_for (mixed $nickname, mixed $note)
set_operator_passwd (line 431)
void set_operator_passwd ()
set_referer (line 215)

Sets referer

Sets referer

  • access: public
void set_referer (string $referer)
  • string $referer
set_show_profile (line 226)

Sets the show profile flag

Sets the show profile flag

  • access: public
void set_show_profile ([boolean $bool = true])
  • boolean $bool
test (line 2066)

Test class Chat

Test class Chat call like: Chat::test();

void test ()
update_channel (line 543)

Creates a channel (default, moderated)

Creates a channel (default, moderated)

  • access: public
void update_channel (string $name, integer $type, mixed $passwd, mixed $message)
  • string $name
  • integer $type
write_js_update (line 353)

Writes javascript code to update clients

Writes javascript code to update clients

  • access: public
boolean write_js_update (string; $message, [object; $recipient = null])
  • string; $message: message to write
  • object; $recipient: recipient
write_sys_msg (line 315)

Writes a message from the system-bot to given recipient

Writes a message from the system-bot to given recipient

  • access: public
boolean write_sys_msg (string; $message, object; $recipient, [mixed $whispered = false], [mixed $hidden = false])
  • string; $message: message to write
  • object; $recipient: recipient
_check_flag (line 155)
void _check_flag (mixed $lang)

Documentation generated on Tue, 29 Jun 2004 14:41:55 +0200 by phpDocumentor 1.3.0RC3