dotBotPHP:AIM Online Documentation
http://therisenrealm.vze.com

  Introduction
Welcome to dotBotPHP, an all in one AIM client written in PHP!
 
  Login
  • Account Username: AIM screen name to log into [required]
  • Account Password: AIM password [required]
  • Macro Module: Module to use [required]
  • Macro Password: Password of selected macro [required]
  • Startup script: Script to run once logged in
  • Logging: Log to a file in the logs/ folder - leave blank to disable
  • Continue running after user disconnect: After the browser is closed, with this checked, the bot will continue running - only works with SAFE_MODE off
 
  Command Line Functions

Bots can be run directly from the URL, using command line functions.

client.php?cmd;[account_username];[account_password];[macro_module];[macro_password];[startup_script optional];[log_file optional];

Remember to check the Login section for information on the fields.

 
  Commands
These functions are used inside a instant messenger window.

IM: Administration Commands

Login

  • Login
    #admin login [password string]
  • Logout
    #admin logout

Instant Messaging

  • Send IM
    #admin im %[sceenname string]% %[message string]%

Chat

  • Join Room
    #admin chatjoin [exchange int] %[room_name string]%
  • Leave Room
    #admin chatleave [id int]
  • Send Message
    #admin chatsend [id int] %[message string]%
  • Whisper Message
    #admin chatwhipser [id int] %[user string]% %[message string]%
  • Invite Users
    #admin chatinvite [id int] %[users_list string (comma delimited)]% %[message string]%
  • ID/Name Translation Table
    #admin chats

Status

  • Set Info/Profile
    #admin setinfo %[message string]%
  • Set Away Message
    #admin setaway %[message string]%
  • Unset Away Message
    #admin setunaway
  • Set Idle
    #admin setidle [seconds int]
  • Format Screenname
    #admin nick %[new_username string]%
  • Warn User
    #admin warn %[username string]% [type int (0: anonymous; 1: normal)]

System

  • Sign Off
    #admin signoff

Miscellaneous

  • Help
    #admin help
  • Get Bot Host
    #admin host
  • Execute Script
    #admin script %[filename string]%

Chat: Normal Commands

Miscellaneous

  • Help
    #admin help
  • View Runtime
    #admin runtime
 
  Macros

Macros are placed in the macros/ directory and consist of two parts, settings, and the events. Macro files are saved with a .php extension.

$settings['macro_password'] = "password";

function event_im_in($user, $auto, $message) { }
function event_chat_join($id, $room_name) { }
function event_chat_leave($id) { }
function event_chat_in($id, $user, $whsiper, $message) { }
function event_chat_update_buddy($id, $inside, $users) { }
function event_chat_invite($name, $id, $user, $message) { }
function event_warn($level, $user) { }
function event_update_buddy($user, $online, $level, $signon, $idle, $uc) { }

$settings['macro_password'] is a required variable, that sets the password need to log in using that macro. It's there to prevent abuse, and allow multiple macros. The functions after that are even handlers. When an event occurs, the appropriate event is raised. For an explanation of how the arguments work, read the events section.

 
  Scripts

Scripts are little snippets of code to simply certain tasks, like IMing a list of people. These are placed in the scripts/ directory, and are saved with the .php extension.

 
  Logging

Logging is an informative device that shows you what has been happening with the client. Logs are shown in the browser, and optionally, saved into a file. By specifying a file in the logging field, the events will be appended to the file.

The log format is broken into three parts:

  • Date & Time
  • Scope
  • Data

The date and time is when it happened, scope is where it happened/what type it is, and data is the information associated with the event.

The color coding system in the browser has no code (no, just kidding, that was a rip off from a commercial). There are 5 basic colors, and they each have a meaning.

  • Admin Panel Related
  • Error
  • Messaging & Chat
  • System
  • Unhandled
 
  Events
  • Instant Message Received
    function event_im_in($user, $auto, $message) { }
    » string user: source user
    » string auto: automatic message (T/F)
    » string message: message
  • Chat Joined
    function event_chat_join($id, $room_name) { }
    » int id: TOC server assigned chat id
    » string room_name: chat room name
  • Chat Left
    function event_chat_leave($id) { }
    » int id: TOC server assigned chat id
  • Chat Message Received
    function event_chat_in($id, $user, $whsiper, $message) { }
    » int id: TOC server assigned chat id
    » string user: source user
    » string whisper: whsiper (T/F)
    » string message: message
  • Chat User Join/Leave
    Note: This event will be raise on the initial joining of a chatroom, and the users argument will contain all the users.
    function event_chat_update_buddy($id, $inside, $users) { }
    » int id: TOC server assigned chat id
    » string inside: joined (T/F)
    » array users: users
  • Chat Invited To
    function event_chat_invite($name, $id, $user, $message) { }
    » string name: chat room name
    » int id: TOC server assigned chat id
    » string user: source user
    » string message: message
  • Warned/Eviled
    function event_warn($level, $user) { }
    » int level: new warning level
    » string user: source user (blank if anonymous)
  • Buddy Update
    function event_update_buddy($user, $online, $level, $signon, $idle, $uc) { }
    » string user: user
    » string online: online (T/F)
    » int level: warning level
    » int signon: signon time (UNIX EPOCH)
    » int idle: idle time (UNIX EPOCH)
    » undocumented uc: flags
 
  Methods
Login
  • Signin
    sign_in ( )
  • Signout
    sign_off ( )

Instant Messaging

  • Send IM
    interface_send_im ( string username, string message )

Chat

  • Join Room
    interface_chat_join ( int exchange, string room_title )
  • Leave Chat
    interface_chat_leave ( int id )
  • Send Message
    interface_chat_send ( int id, string message )
  • Whipser Message
    interface_chat_whisper ( int id, string username, string message )
  • Invite
    interface_chat_invite ( int id, string message, array user_list )

Status

  • Set Info/Profile
    interface_set_info ( string message )
  • Set Away Message
    interface_set_away ( string message )
  • Unset Away Message
    interface_set_unaway ( )
  • Set Idle
    interface_set_idle ( int seconds )
  • Format Screenname
    interface_format_nickname ( string username )
  • Warn User
    interface_warn ( string username, warn type )

Miscellaneous

  • Execute Script
    run_script ( string filename )
 
  Examples

Script

The following scripts joins a chat room on exchange 4, chat room name "Test chat", and changes the info.

<?php

interface_chat_join(4, "Test chat");
interface_set_info("<b>Hello!</b>");

?>

Macro

The following script sends a welcome message every time someone enters the rooms the client is inside of.

<?php

$settings['macro_password'] = "password";

function event_im_in($user, $auto, $message) {
   $stripped_message = strip_tags($message);
}

function event_chat_join($id, $room_name) {
}

function event_chat_leave($id) {
}

function event_chat_in($id, $user, $whsiper, $message) {
   $stripped_message = strip_tags($message);
}

function event_chat_update_buddy($id, $inside, $users) {
   if ($inside == "T") {
      interface_chat_send($id, "Hi! Welcome to the chat.");
   }
}

function event_chat_invite($name, $id, $user, $message) {
   $stripped_message = strip_tags($message);
}

function event_warn($level, $user) {
}

function event_update_buddy($user, $online, $level, $signon, $idle, $uc) {
}

?>