Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

WormbotReporter.WIR_IRCConnection

Extends
WIR_IRCBase
Modifiers
config

Copyright (c) 2005-2007 by Wormbo $Id$

Core.Object
|   
+-- Engine.Actor
   |   
   +-- Engine.Info
      |   
      +-- Engine.InternetInfo
         |   
         +-- IpDrv.InternetLink
            |   
            +-- IpDrv.TcpLink
               |   
               +-- WormbotReporter.WIR_IRCBase
                  |   
                  +-- WormbotReporter.WIR_IRCConnection

Constants Summary
MILLISECONDS_PER_WEEK=604800000
Inherited Contants from WormbotReporter.WIR_IRCBase
ERR_ALREADYREGISTRED, ERR_BADCHANNELKEY, ERR_BANNEDFROMCHAN, ERR_CANNOTSENDTOCHAN, ERR_CANTKILLSERVER, ERR_CHANNELISFULL, ERR_CHANOPRIVSNEEDED, ERR_ERRONEUSNICKNAME, ERR_FILEERROR, ERR_INVITEONLYCHAN, ERR_KEYSET, ERR_NEEDMOREPARAMS, ERR_NICKCOLLISION, ERR_NICKNAMEINUSE, ERR_NOADMININFO, ERR_NOLOGIN, ERR_NOMOTD, ERR_NONICKNAMEGIVEN, ERR_NOOPERHOST, ERR_NOORIGIN, ERR_NOPERMFORHOST, ERR_NOPRIVILEGES, ERR_NORECIPIENT, ERR_NOSUCHCHANNEL, ERR_NOSUCHNICK, ERR_NOSUCHSERVER, ERR_NOTEXTTOSEND, ERR_NOTONCHANNEL, ERR_NOTOPLEVEL, ERR_NOTREGISTERED, ERR_PASSWDMISMATCH, ERR_SUMMONDISABLED, ERR_TOOMANYCHANNELS, ERR_TOOMANYTARGETS, ERR_UMODEUNKNOWNFLAG, ERR_UNKNOWNCOMMAND, ERR_UNKNOWNMODE, ERR_USERNOTINCHANNEL, ERR_USERONCHANNEL, ERR_USERSDISABLED, ERR_USERSDONTMATCH, ERR_WASNOSUCHNICK, ERR_WILDTOPLEVEL, ERR_YOUREBANNEDCREEP, RPL_ADMINEMAIL, RPL_ADMINLOC1, RPL_ADMINLOC2, RPL_ADMINME, RPL_AWAY, RPL_BANLIST, RPL_CHANNELMODEIS, RPL_ENDOFBANLIST, RPL_ENDOFINFO, RPL_ENDOFLINKS, RPL_ENDOFMOTD, RPL_ENDOFNAMES, RPL_ENDOFSTATS, RPL_ENDOFUSERS, RPL_ENDOFWHO, RPL_ENDOFWHOIS, RPL_ENDOFWHOWAS, RPL_INFO, RPL_INVITING, RPL_ISON, RPL_LINKS, RPL_LIST, RPL_LISTEND, RPL_LISTSTART, RPL_LUSERCHANNELS, RPL_LUSERCLIENT, RPL_LUSERME, RPL_LUSEROP, RPL_LUSERUNKNOWN, RPL_MOTD, RPL_MOTDSTART, RPL_NAMEREPLY, RPL_NONE, RPL_NOTOPIC, RPL_NOUSERS, RPL_NOWAWAY, RPL_REHASHING, RPL_STATSCLINE, RPL_STATSCOMMANDS, RPL_STATSILINE, RPL_STATSKLINE, RPL_STATSLINKINFO, RPL_STATSLLINE, RPL_STATSNLINE, RPL_STATSOLINE, RPL_STATSUPTIME, RPL_STATSYLINE, RPL_SUMMONING, RPL_TIME, RPL_TOPIC, RPL_TRACECONNECTING, RPL_TRACEHANDSHAKE, RPL_TRACELINK, RPL_TRACELOG, RPL_TRACENEWTYPE, RPL_TRACEOPERATOR, RPL_TRACESERVER, RPL_TRACEUNKNOWN, RPL_TRACEUSER, RPL_UMODEIS, RPL_UNAWAY, RPL_USERHOST, RPL_USERS, RPL_USERSSTART, RPL_VERSION, RPL_WHOISCHANNELS, RPL_WHOISIDLE, RPL_WHOISOPERATOR, RPL_WHOISSERVER, RPL_WHOISUSER, RPL_WHOREPLY, RPL_WHOWASUSER, RPL_YOUREOPER

Variables Summary
boolbAutoReconnect
boolbAutoRejoin
boolbDebugStartMatch
boolbNoChannelCodes
boolbNoChannelColor
boolbRegistered
intChannelJoinTime
stringChannelKey
stringChannelName
stringChannelTopic
array<string>CommandQueue
intConnectTimeout
stringDebugLogFileName
intFloodProtectBytes
intFloodProtectBytesDuration
intFloodProtectCommandPenalty
intFloodProtectMaxPenalty
intFloodProtectMessagePenalty
stringLastTopicTemplate
FileLogLogFile
intMaxLenMessageQueue
array<TMessage>MessageQueue
stringMsgBotFlooding
stringMsgBotJoinChat
stringMsgBotJoinChatTwoWay
stringMsgBotJoinReport
stringMsgBotJoinReportChat
stringMsgBotJoinReportChatTwoWay
MutWormbotMyMutator
array<TKeyValuePair>NetworkParameters
stringRealServerName
intReconnectDelay
WIR_RegistrationHandlerRegistrationHandler
intSendLimitTime
array<TSentBytes>SentBytes
IpAddrServerAddress
stringServerName
stringServerPassword
intTimestampNow
intTimestampTimeout
stringUserIdent
stringUserNick
Inherited Variables from IpDrv.TcpLink
AcceptClass, LinkState, RecvBuf, RemoteAddr, SendFIFO

Enumerations Summary
EModeType
MT_Unknown, MT_Join, MT_Part, MT_Quit, MT_Kick, MT_Nick,
Inherited Enumerations from IpDrv.TcpLink
ELinkState

Structures Summary
TKeyValuePair
Key, Value
TMessage
Message, Timestamp, bImportant
TSentBytes
Timestamp, Length

Delegates Summary
delegate OnChat (string Nick, string Message)
delegate OnMode (EModeType Type, string Nick, optional string Message)
delegate OnTimeout ()))

Functions Summary
event BeginState ()))
ConnectionEstablished
event BeginState ()))
InChannel
functionstring Chomp (string S))
function ClearTimeout ()))
event Closed ()))
ConnectionEstablished
function Connect ()
function Connect ()))
NotConnected
function DebugLog (string S))
function Disconnect (bool bReconnect, string QuitMessage)
function Disconnect (bool bReconnect, string QuitMessage))
ConnectionEstablished
function Disconnect (bool bReconnect, string QuitMessage))
InChannel
function Disconnect (bool bReconnect, string QuitMessage))
NotConnected
functionbool GetNetworkParameter (string Key, out string Value))
function HandleCommand (string Command, string Parameters))
function HandleNumericReply (int Command, string Server, string Target, string Parameters))
function HandleNumericReply (int Command, string Server, string Target, string Parameters))
ConnectionEstablished
function HandleStringReply (string Command, string Server, string Target, string Parameters))
function HandleStringReply (string Command, string Server, string Target, string Parameters))
InChannel
function HandleStringReply (string Command, string Server, string Target, string Parameters))
RegisterationComplete
functionbool ImportantMessagesQueued ()))
functionbool IsFlooding (int LenNextCommand))
functionbool IsTargetChannel (string Target))
function JoinChannel (string Channel, string Key))
function JoinChannel (string Channel, string Key))
InChannel
function JoinChannel (string Channel, string Key))
RegisterationComplete
event Opened ()))
NotConnected
function PartChannel ()))
function PartChannel ()))
InChannel
event PostBeginPlay ()))
event ReceivedLine (string Line))
function Registered ()
function Registered ()))
LoggedIn
function Registered ()))
RegisterationComplete
event Resolved (IpAddr Address))
NotConnected
event ResolveFailed ()))
NotConnected
function SendCommand (string Command, bool bIsCommand, optional bool bImportant))
function SendMessage (string Message, optional bool bImportant))
functionint SendText (string Line))
function SetConnection (string Server, int Port, string Password, string Nick, string Ident))
function SetNick (string NewNick))
function SetNick (string NewNick))
ConnectionEstablished
function SetRegistrationDetails (class<WIR_RegistrationHandler> HandlerClass, string RegistrationDetails))
function SetTimeout (float TimeoutSeconds))
event Tick (float DeltaTime))
event Tick (float DeltaTime))
ConnectionEstablished
event Tick (float DeltaTime))
InChannel
function UpdateTopic (optional bool bLeaving))
Inherited Functions from IpDrv.TcpLink
Accepted, BindPort, Close, Closed, IsConnected, Listen, Open, Opened, ReadBinary, ReadText, ReceivedBinary, ReceivedLine, ReceivedText, SendBinary, SendText

States Summary
ConnectionEstablished Source code
state ConnectionEstablished
BeginState, Closed, Disconnect, HandleNumericReply, SetNick, Tick
InChannel Source code
state InChannel extends RegisterationComplete
BeginState, Disconnect, HandleStringReply, JoinChannel, PartChannel, Tick
LoggedIn Source code
state LoggedIn extends ConnectionEstablished
Registered
NotConnected Source code
auto state NotConnected
Connect, Disconnect, Opened, Resolved, ResolveFailed
RegisterationComplete Source code
state RegisterationComplete extends LoggedIn
HandleStringReply, JoinChannel, Registered


Constants Detail

MILLISECONDS_PER_WEEK Source code

const MILLISECONDS_PER_WEEK = 604800000;
Number of milliseconds per week. Used to handle time intervals at Level.DayOfWeek wrap-around


Variables Detail

bAutoReconnect Source code

var bool bAutoReconnect;

bAutoRejoin Source code

var bool bAutoRejoin;

bDebugStartMatch Source code

var bool bDebugStartMatch;

bNoChannelCodes Source code

var bool bNoChannelCodes;

bNoChannelColor Source code

var bool bNoChannelColor;

bRegistered Source code

var bool bRegistered;
Whether this client already registered on the server.

ChannelJoinTime Source code

var int ChannelJoinTime;
Timestamp when the channel was joined to delay the first message.

ChannelKey Source code

var string ChannelKey;
Password required to join the channel.

ChannelName Source code

var string ChannelName;
Name of the channel to join after login and registration.

ChannelTopic Source code

var string ChannelTopic;
Channel topic received from the server.

CommandQueue Source code

var array<string> CommandQueue;
Holds the commands to be sent as soon as the flood protection allows.

ConnectTimeout Source code

var int ConnectTimeout;

DebugLogFileName Source code

var string DebugLogFileName;

FloodProtectBytes Source code

var int FloodProtectBytes;

FloodProtectBytesDuration Source code

var int FloodProtectBytesDuration;

FloodProtectCommandPenalty Source code

var int FloodProtectCommandPenalty;

FloodProtectMaxPenalty Source code

var int FloodProtectMaxPenalty;

FloodProtectMessagePenalty Source code

var int FloodProtectMessagePenalty;

LastTopicTemplate Source code

var config string LastTopicTemplate;

LogFile Source code

var FileLog LogFile;
Log file handle

MaxLenMessageQueue Source code

var int MaxLenMessageQueue;

MessageQueue Source code

var array<TMessage> MessageQueue;
Holds other messages to be sent when no commands are queued.

MsgBotFlooding Source code

var localized string MsgBotFlooding;

MsgBotJoinChat Source code

var localized string MsgBotJoinChat;

MsgBotJoinChatTwoWay Source code

var localized string MsgBotJoinChatTwoWay;

MsgBotJoinReport Source code

var localized string MsgBotJoinReport;

MsgBotJoinReportChat Source code

var localized string MsgBotJoinReportChat;

MsgBotJoinReportChatTwoWay Source code

var localized string MsgBotJoinReportChatTwoWay;

MyMutator Source code

var MutWormbot MyMutator;

NetworkParameters Source code

var array<TKeyValuePair> NetworkParameters;
Parameters used by this server.

RealServerName Source code

var string RealServerName;
DNS name of IRC server as reported by the server itself.

ReconnectDelay Source code

var int ReconnectDelay;

RegistrationHandler Source code

var WIR_RegistrationHandler RegistrationHandler;
Handles the registration on the IRC server.

SendLimitTime Source code

var int SendLimitTime;
Simple flood protection. If this is more than 10s ahead of the current timestamp, nothing is sent this tick.

SentBytes Source code

var array<TSentBytes> SentBytes;
Bytes sent in the last few seconds.

ServerAddress Source code

var IpAddr ServerAddress;
Resolved server address and port.

ServerName Source code

var string ServerName;
DNS name of IRC server.

ServerPassword Source code

var string ServerPassword;
Password required to connect to the server.

TimestampNow Source code

var int TimestampNow;
Current timestamp.

TimestampTimeout Source code

var int TimestampTimeout;
Tracks timeouts.

UserIdent Source code

var string UserIdent;
User ident

UserNick Source code

var string UserNick;
User's current nick name


Enumerations Detail

EModeType Source code

enum EModeType
{
MT_Unknown, MT_Join, MT_Part, MT_Quit, MT_Kick, MT_Nick,
};


Structures Detail

TKeyValuePair Source code

struct TKeyValuePair
{
var string Key;
var string Value;
};


TMessage Source code

struct TMessage
{
var bool bImportant;
var string Message;
var int Timestamp;
};


TSentBytes Source code

struct TSentBytes
{
var int Length;
var int Timestamp;
};



Delegates Detail

OnChat Source code

delegate OnChat ( string Nick, string Message )
Called when someone in the channel talks.

OnMode Source code

delegate OnMode ( EModeType Type, string Nick, optional string Message )
Called when something in the channel changes.

OnTimeout Source code

delegate OnTimeout ( ) )
Called on timeout. Used internally.


Functions Detail

BeginState ConnectionEstablished Source code

event BeginState ( ) )
Clear the queues and network info.

BeginState InChannel Source code

event BeginState ( ) )
Clear the queues and network info.

Chomp Source code

function string Chomp ( string S) )
Removes a leading ":" from a string.

ClearTimeout Source code

function ClearTimeout ( ) )
Clears a timeout delay.

Closed ConnectionEstablished Source code

event Closed ( ) )
The server connection has been closed.

Connect Source code

function Connect ( )
Try to establish a connection to the IRC server.

Connect NotConnected Source code

function Connect ( ) )
Already disconnected. Try to reconnect if desired.

DebugLog Source code

function DebugLog ( string S) )
Log debug information.

Disconnect Source code

function Disconnect ( bool bReconnect, string QuitMessage )
Disconnect from the currently used IRC server.

Disconnect ConnectionEstablished Source code

function Disconnect ( bool bReconnect, string QuitMessage) )
Disconnect from the server.

Disconnect InChannel Source code

function Disconnect ( bool bReconnect, string QuitMessage) )
Disconnect from the server.

Disconnect NotConnected Source code

function Disconnect ( bool bReconnect, string QuitMessage) )
Already disconnected. Try to reconnect if desired.

GetNetworkParameter Source code

function bool GetNetworkParameter ( string Key, out string Value) )
Returns true if the specified parameter is set on this network and sets Value.

HandleCommand Source code

function HandleCommand ( string Command, string Parameters) )
Handles a string command received from the server.

HandleNumericReply Source code

function HandleNumericReply ( int Command, string Server, string Target, string Parameters) )
Handles a numeric message received from the server.

HandleNumericReply ConnectionEstablished Source code

function HandleNumericReply ( int Command, string Server, string Target, string Parameters) )
Detects numeric 001 as confirmation for login.

HandleStringReply Source code

function HandleStringReply ( string Command, string Server, string Target, string Parameters) )
Handles a string message received from the server.

HandleStringReply InChannel Source code

function HandleStringReply ( string Command, string Server, string Target, string Parameters) )
Detects when the client joined the channel.

HandleStringReply RegisterationComplete Source code

function HandleStringReply ( string Command, string Server, string Target, string Parameters) )
Detects when the client joined the channel.

ImportantMessagesQueued Source code

function bool ImportantMessagesQueued ( ) )
Returns whether there are currently important messages in the queue.

IsFlooding Source code

function bool IsFlooding ( int LenNextCommand) )
Returns whether the client is flodding the server with messages.

IsTargetChannel Source code

function bool IsTargetChannel ( string Target) )
Return, whether the channel is a target channel.

JoinChannel Source code

function JoinChannel ( string Channel, string Key) )
Join a channel.

JoinChannel InChannel Source code

function JoinChannel ( string Channel, string Key) )
Join a channel.

JoinChannel RegisterationComplete Source code

function JoinChannel ( string Channel, string Key) )
Join a channel.

Opened NotConnected Source code

event Opened ( ) )
The server connection has been opened successfully.

PartChannel Source code

function PartChannel ( ) )
Parts the channel.

PartChannel InChannel Source code

function PartChannel ( ) )
Parts the channel.

PostBeginPlay Source code

event PostBeginPlay ( ) )
Initializes the IRC socket.

ReceivedLine Source code

event ReceivedLine ( string Line) )
Logs the received text.

Registered Source code

function Registered ( )
Called when registration was completed.

Registered LoggedIn Source code

function Registered ( ) )
Called when registeration was successful.

Registered RegisterationComplete Source code

function Registered ( ) )
Use the global non-state inplementation.

Resolved NotConnected Source code

event Resolved ( IpAddr Address) )
Server address resolved. Try to connect.

ResolveFailed NotConnected Source code

event ResolveFailed ( ) )
Resolving server address failed.

SendCommand Source code

function SendCommand ( string Command, bool bIsCommand, optional bool bImportant) )
Queues a command for sending.

SendMessage Source code

function SendMessage ( string Message, optional bool bImportant) )
Sends a message to the channel.

SendText Source code

function int SendText ( string Line) )
Logs the sent text.

SetConnection Source code

function SetConnection ( string Server, int Port, string Password, string Nick, string Ident) )
Sets the registration handler class.

SetNick Source code

function SetNick ( string NewNick) )
changes the client's nick name.

SetNick ConnectionEstablished Source code

function SetNick ( string NewNick) )
Changes the client's nick name.

SetRegistrationDetails Source code

function SetRegistrationDetails ( class<WIR_RegistrationHandler> HandlerClass, string RegistrationDetails) )
Sets the registration handler class.

SetTimeout Source code

function SetTimeout ( float TimeoutSeconds) )
Sets a timeout delay.

Tick Source code

event Tick ( float DeltaTime) )
Updates the current timestamp.

Tick ConnectionEstablished Source code

event Tick ( float DeltaTime) )
Send commands when flood protection allows it.

Tick InChannel Source code

event Tick ( float DeltaTime) )
Send commands and messages to the channel when flood protection allows it.

UpdateTopic Source code

function UpdateTopic ( optional bool bLeaving) )
Updates the channel topic.


Defaultproperties

defaultproperties
{
  bAlwaysTick = True
  
  MsgBotJoinChat              = "[^B]%m[^B] - relaying chat from [^B]%s[^B]"
  MsgBotJoinChatTwoWay        = "[^B]%m[^B] - relaying chat from and to [^B]%s[^B]"
  MsgBotJoinReport            = "[^B]%m[^B] - reporting from [^B]%s[^B]"
  MsgBotJoinReportChat        = "[^B]%m[^B] - reporting and relaying chat from [^B]%s[^B]"
  MsgBotJoinReportChatTwoWay  = "[^B]%m[^B] - reporting and relaying chat from and to [^B]%s[^B]"
  
  MsgBotFlooding = "[^B]I had to drop some messages to catch up.[^B]"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Creation time: Do 14.8.2014 09:58:29.875 - Created with UnCodeX