This is a custom protocol for handling irc requests that is capable of parsing input from multiple sessions (connections) so that we can use only 1 network instance for all wm-bot sessions that are connected to target server
Inheritance: libirc.Protocols.ProtocolIrc
示例#1
0
 public Network(string server, Instance Instance, WmIrcProtocol protocol)
     : base(server, (libirc.Protocols.ProtocolIrc)protocol)
 {
     this.instance = Instance;
     this.Config.TrafficInterval = Configuration.IRC.Interval;
     this.Config.Nick = Instance.Nick;
     if (Configuration.IRC.UsingBouncer)
         this.IsLoaded = true;
 }
示例#2
0
 public Network(string server, Instance Instance, WmIrcProtocol protocol)
     : base(server, (libirc.Protocols.ProtocolIrc)protocol)
 {
     this.instance = Instance;
     this.Config.TrafficInterval = Configuration.IRC.Interval;
     this.Config.Nick            = Instance.Nick;
     if (Configuration.IRC.UsingBouncer)
     {
         this.IsLoaded = true;
     }
 }
示例#3
0
 /// <summary>
 /// Creates a new bot instance but not connect it to IRC
 /// </summary>
 /// <param name="name">Name</param>
 /// <param name="port">Port</param>
 public Instance(string name, int port = 0)
 {
     Nick                     = name;
     Port                     = port;
     this.Protocol            = new WmIrcProtocol(Configuration.IRC.NetworkHost, Hostname, Port);
     this.Network             = new Network(Configuration.IRC.NetworkHost, this, this.Protocol);
     this.Network.Nickname    = Nick;
     this.Network.UserName    = Configuration.IRC.Username;
     this.Network.Ident       = Configuration.IRC.Ident;
     this.Protocol.IRCNetwork = this.Network;
 }
示例#4
0
 /// <summary>
 /// Creates a new bot instance but not connect it to IRC
 /// </summary>
 /// <param name="name">Name</param>
 /// <param name="port">Port</param>
 public Instance(string name, int port = 0)
 {
     Nick = name;
     Port = port;
     this.Protocol = new WmIrcProtocol(Configuration.IRC.NetworkHost, Hostname, Port);
     this.Network = new Network(Configuration.IRC.NetworkHost, this, this.Protocol);
     this.Network.Nickname = Nick;
     this.Network.UserName = Configuration.IRC.Username;
     this.Network.Ident = Configuration.IRC.Ident;
     this.Protocol.IRCNetwork = this.Network;
 }
示例#5
0
 public Network(string server, Instance Instance, WmIrcProtocol protocol)
     : base(server, (libirc.Protocols.ProtocolIrc)protocol)
 {
     this.instance = Instance;
 }