private static void joinChannels() { irc.ircJoin(debugChannel); DAL.Select q = new DAL.Select("channel_name"); q.setFrom("channel"); q.addWhere(new DAL.WhereConds("channel_enabled", 1)); q.addWhere(new DAL.WhereConds("channel_network", _ircNetwork.ToString())); foreach (object[] item in _dbal.executeSelect(q)) { irc.ircJoin((string)(item)[0]); } }
public IAL(uint ircNetwork) { this.floodProtectionWaitTime = 500; this.clientVersion = "Helpmebot IRC Access Layer 1.0"; _networkId = ircNetwork; DAL db = DAL.singleton(); DAL.Select q = new DAL.Select("in_host", "in_port", "in_nickname", "in_password", "in_username", "in_realname", "in_log", "in_nickserv"); q.setFrom("ircnetwork"); q.addLimit(1, 0); q.addWhere(new DAL.WhereConds("in_id", ircNetwork.ToString())); ArrayList configSettings = db.executeSelect(q); _ircServer = (string)(((object[])configSettings[0])[0]); _ircPort = (uint)((object[])configSettings[0])[1]; _myNickname = (string)(((object[])configSettings[0])[2]); _myPassword = (string)(((object[])configSettings[0])[3]); _myUsername = (string)(((object[])configSettings[0])[4]); _myRealname = (string)(((object[])configSettings[0])[5]); this.logEvents = (bool)(((object[])configSettings[0])[6]); _nickserv = (string)(((object[])configSettings[0])[7]); if (/*recieveWallops*/ true) { this.connectionUserModes += 4; } if (/*invisible*/ true) { this.connectionUserModes += 8; } initialiseEventHandlers(); }