public void On( PrivMsgEvent e ) { var a = e.Message.Split(new[]{' '},StringSplitOptions.RemoveEmptyEntries); foreach ( var chan in e.AffectedChannels ) { switch (a[0]) { case "!restart": Program.RequestRelaunch(); e.Connection.StopPumping(); break; case "!quit": e.Connection.Send("QUIT"); e.Connection.StopPumping(); break; case "!info": if (State==null) { e.Connection.Send("NOTICE "+chan+" :No state, I'm senile!"); } else { var info = State.GetChannelInfo(chan); if (!info.Joined) e.Connection.Send("NOTICE "+chan+" :What? I'm in this channel?!?"); else e.Connection.Send("NOTICE "+chan+" :Topic: "+(info.Topic??"N/A")+" People: "+string.Join(", ",info.People.Select(p=>p.NUH.Nick))); } break; case "!join": e.Connection.Send("JOIN "+a[1]); break; } } }
public void On( PrivMsgEvent e ) { }