private static string GetSelfHost(Channel channel) { // try to get own hostname, if we can't find it, use default from configuration files string hostname = Configuration.IRC.Hostname; libirc.User self = channel.RetrieveUser(channel.PrimaryInstance.Nick); if (self != null) { hostname = self.Host; } return(hostname); }
public void GetOp(Channel chan) { if (!GetConfig(chan, "OP.Permanent", false)) { chan.PrimaryInstance.irc.Queue.Send("CS op " + chan.Name, IRC.priority.high); return; } // get our user User user = chan.RetrieveUser(chan.PrimaryInstance.Nick); if (user == null) { chan.PrimaryInstance.irc.Queue.Send("CS op " + chan.Name, IRC.priority.high); return; } if (!user.IsOperator) { chan.PrimaryInstance.irc.Queue.Send("CS op " + chan.Name, IRC.priority.high); } }
private static string GetSelfHost(Channel channel) { // try to get own hostname, if we can't find it, use default from configuration files string hostname = Configuration.IRC.Hostname; libirc.User self = channel.RetrieveUser(channel.PrimaryInstance.Nick); if (self != null) hostname = self.Host; return hostname; }