CIRCServer Prototype
Syntax
var object = new CIRCServer(parent, hostname, port, isSecure, password);
Arguments
| Argument | Summary |
|---|---|
| parent | |
| hostname | |
| port | |
| isSecure | |
| password |
Remarks
Members
| Member | Summary |
|---|---|
| CTCPHelpAction | |
| CTCPHelpClientinfo | |
| CTCPHelpDcc | |
| CTCPHelpHost | |
| CTCPHelpOs | |
| CTCPHelpPing | |
| CTCPHelpSource | |
| CTCPHelpTime | |
| CTCPHelpVersion | |
| actTo | |
| addChannel | |
| addTarget | |
| addUser | |
| changeNick | |
| connect | |
| ctcpTo | |
| flushSendQueue | |
| getChannel | |
| getChannelsLength | |
| getURL | Returns the IRC URL representation of this server. |
| getUser | |
| getUsersLength | |
| login | |
| logout | |
| messageTo | Takes care not to let more than MAX_LINES_PER_SEND lines out per cycle. Cycle's are defined as the time between onPoll calls. |
| noticeTo | |
| on001 | Successful login |
| on005 | server features |
| on251 | users |
| on254 | channels |
| on290 | CAPAB response |
| on301 | user away message |
| on302 | userhost reply |
| on311 | whois name |
| on312 | whois server |
| on315 | end of who |
| on317 | whois idle time |
| on318 | end of whois |
| on319 | whois channel list |
| on324 | channel mode reply |
| on329 | channel time stamp? |
| on330 | ircu's 330 numeric ("X is logged in as Y") |
| on331 | TOPIC reply - no topic set |
| on332 | TOPIC reply - topic set |
| on333 | topic information |
| on348 | channel except entry |
| on349 | channel except list end |
| on352 | who reply |
| on353 | names reply |
| on366 | end of names |
| on367 | channel ban entry |
| on368 | channel ban list end |
| on482 | don't have operator perms |
| onCTCP | |
| onCTCPAction | |
| onCTCPClientinfo | |
| onCTCPDcc | |
| onCTCPFinger | |
| onCTCPHost | |
| onCTCPOs | |
| onCTCPPing | |
| onCTCPReply | |
| onCTCPSource | |
| onCTCPTime | |
| onCTCPVersion | |
| onChanMode | |
| onConnect | What to do when the client connects to it's primary server |
| onDCCChat | |
| onDCCSend | |
| onDataAvailable | |
| onDisconnect | |
| onInvite | |
| onJoin | |
| onKick | |
| onMode | user changed the mode |
| onNick | |
| onNotice | |
| onParsedData | onParsedData forwards to next event, based on e.code |
| onPart | |
| onPing | |
| onPoll | |
| onPong | |
| onPrivmsg | |
| onQuit | |
| onRawData | onRawData begins shaping the event by parsing the IRC message at it's simplest level. After onRawData, the event will have the following properties: name value |
| onSendData | |
| onStreamClose | |
| onStreamDataAvailable | |
| onTopic | User changed topic |
| onUserMode | |
| onWallops | |
| queuedSendData | |
| sayTo | |
| sendData | |
| splitLinesForSending | Please keep this in mind when editing: |
| toLowerCase | |
| updateLagTimer | |
| userhost | |
| userip | |
| who | |
| whois | Abstracts the whois command. |
| whowas |
See Also
Source Code
function CIRCServer (parent, hostname, port, isSecure, password)
{
var serverName = hostname + ":" + port;
var s;
if (serverName in parent.servers)
{
s = parent.servers[serverName];
}
else
{
s = this;
s.channels = new Object();
s.users = new Object();
}
s.unicodeName = serverName;
s.viewName = serverName;
s.canonicalName = serverName;
s.encodedName = serverName;
s.hostname = hostname;
s.port = port;
s.parent = parent;
s.isSecure = isSecure;
s.password = password;
s.connection = null;
s.isConnected = false;
s.sendQueue = new Array();
s.lastSend = new Date("1/1/1980");
s.lastPingSent = null;
s.lastPing = null;
s.sendsThisRound = 0;
s.savedLine = "";
s.lag = -1;
s.usersStable = true;
s.supports = null;
s.channelTypes = null;
s.channelModes = null;
s.channelCount = -1;
s.userModes = null;
s.maxLineLength = 400;
s.capab = new Object();
parent.servers[s.canonicalName] = s;
if ("onInit" in s)
s.onInit();
return s;
}