Class Chat

Description

Chat describes the whole chat

  • version: $Id: class.Chat.inc,v 1.70 2003/04/28 16:21:55 letreo Exp $
  • access: public
  • author: Michael Oertel <michael@ortelius.de>

Located in Program_Root/include/class.Chat.inc (line 48)


	
			
Variable Summary
Method Summary
void Chat ([mixed $name = CHAT_NAME], mixed $supported_languages, string $channel)
boolean channel_exists (string $channel)
boolean check_URL (string $url, [mixed $checkIMG = true])
boolean confirm (string $code)
boolean connect ()
void 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 get_best_chatter (mixed $grade, mixed $limit)
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)
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_unignored_chatters_option_list (string $channel, [string $nick_constraint = ''])
mixed http_post (string $server, integer $port, mixed $url, mixed $vars)
boolean is_online (string $nick)
void logout ()
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_sys_msg (string; $message, object; $recipient, [mixed $whispered = false])
void _check_flag (mixed $lang)
Variables
integer $connection_count (line 62)
array $deathless_chatters = array() (line 92)

nicknames which will never die

string $language (line 68)

Interface language of chat

string $name (line 55)
string $referer (line 80)

referer

string $restrict (line 74)

search string for nicknames

boolean $show_profile = true (line 86)

show profile flag

array $supported_languages = array() (line 98)

all supported languages

Methods
Constructor Chat (line 108)

Constructor.

create a new chat object

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

Checks if given channel name exists

  • access: public
boolean channel_exists (string $channel)
  • string $channel
check_URL (line 1153)

Checks if an URL exists

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

Sets the confirm code to null

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

Connect to the database

Establish a database connection

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

Creates a channel (default, moderated)

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

Creates a private channel

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

Deletes a channel

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

Disconnect the database

void disconnect ()
get_best_chatter (line 1065)
void get_best_chatter (mixed $grade, mixed $limit)
get_channels (line 732)

Gets all the channels

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

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 819)

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 867)

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 1402)

Provides the channel of given chatter

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

Gets all chatters

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

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 846)

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 1089)

Provides a chatter instance if exists

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

Provides the default language of the chat

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

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 1596)
void get_grade_icon (mixed $nick)
get_guests_option_list (line 970)

Gets all guests in given channel as an option list

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

Gets language of the chat

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

Provides the count of registered chatters

array get_last_registered ()
get_mail_count (line 1489)

Provides the count of mails in the DB

integer get_mail_count ()
get_mail_count_last_24h (line 1506)

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

integer get_mail_count_last_24h ()
get_note_for (line 1541)

Provides a note about a given chatter

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

Provides a list of online chatters

array get_online_chatter ()
get_online_chatters_list (line 1356)

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 1416)

Provides the count of online chatters

integer get_online_count ()
get_online_count_last24h (line 1435)

Provides the count of chatters online in the last 24h

integer get_online_count_last24h ()
get_online_time_avg (line 1455)

Provides the avg.

of online time per chatter in seconds per day

double get_online_time_avg ()
get_private_channels (line 780)

Gets all private channels

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

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 199)

Gets referer

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

Provides the count of registered chatters

integer get_registered_count ()
get_show_profile (line 232)

Provides the show profile flag

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

Returns a parsed template

string get_template (string $template, [mixed $inline = null])
  • string $template
get_template_from_cache (line 1635)
void get_template_from_cache (mixed $cacheId)
get_unignored_chatters_option_list (line 998)

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 1663)

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 546)

initialisation of channel_buffers

void init_channel_buffers ()
is_online (line 801)

Checks if a given nickname is online

boolean is_online (string $nick)
  • string $nick
logout (line 1217)

Logout a chatter

void logout ()
make_clean (line 1279)

Cleans up online status of chatters

void make_clean ()
mkinstance_channel (line 279)

Creates a new instance of class channel within session

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

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 562)
void move_channel_to_top (mixed $channel)
put_template_into_cache (line 1609)
void put_template_into_cache (mixed $cacheId, mixed $content, mixed $period)
set_deathless_chatters (line 243)

Sets dethless chatters

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

Sets primary language prefix of the chat

  • access: public
void set_language (string $primary_lang_prefix)
  • string $primary_lang_prefix
set_nick_restrict (line 1021)
void set_nick_restrict (mixed $restrict)
set_note_for (line 1553)
void set_note_for (mixed $nickname, mixed $note)
set_operator_passwd (line 378)
void set_operator_passwd ()
set_referer (line 210)

Sets referer

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

Sets the show profile flag

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

Test class Chat

call like: Chat::test();

void test ()
update_channel (line 483)

Creates a channel (default, moderated)

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

Writes a message from the system-bot to given recipient

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

Documention generated on Fri, 2 May 2003 10:50:42 +0200 by phpDocumentor 1.2.0rc2