public Privmsg(IAppControls app) : base(app) { this.app = app; string speechAll = App.Lion.Get("speech.all"); string actionAll = App.Lion.Get("action.all"); QuirkStart info = app.Connection.Info; // speech, others test(":maria!ip PRIVMSG #spreadbutter :Hello! #moto rola", speechAll, "maria", "Hello! #moto rola", "maria"); // action, others test(":maria!ip PRIVMSG #spreadbutter :\u0001ACTION #dances !butterfly\u0001", actionAll, "maria", "#dances !butterfly", "butterfly"); // speech, self test("PRIVMSG #spreadbutter PEOPLE WANNA DANCE #spreadbutter", speechAll, info.Nick, "PEOPLE WANNA DANCE #spreadbutter", "dance"); // action, self test("PRIVMSG #spreadbutter :\u0001ACTION #plucks !alfalfa!\u0001", actionAll, info.Nick, "#plucks !alfalfa!", "alfalfa"); this.channel = null; // should ignore test("NOTICE PRIVMSG :ooober", "ooober"); test("PRIVMSGCARD #s :m", "mute_monster"); test(":n!p PRIVMSGZ #s :m", "mute_samone"); }
public InputBoxFilters(IAppControls app) { this.app = app; InputBox inputBox = app.InputBox; Quirk connection = app.Connection; inputBox.Message += new InputBox.MessageDel(PrivmsgCurrentChannel); inputBox.Command += (cmd, arg) => { switch (cmd) { // arg is a channel. case "j": connection.Message("JOIN " + arg); break; case "raw": connection.Message(arg); break; // arg is a quit message. case "q": connection.Dispose(arg); break; case "me": connection.Message(PRIVMSG, app.CurrentChannel, arg); break; } }; }
public JoinPartQuit(IAppControls app) : base(app) { this.app = app; string joinOthers = App.Lion.Get("join.others"); string joinSelf = App.Lion.Get("join.self"); string partSelf = App.Lion.Get("part.self"); string partOthers = App.Lion.Get("part.others"); string partReason = App.Lion.Get("part.reason"); string partTotal = App.Lion.Get("part.total"); string quitSelf = App.Lion.Get("quit.self"); string quitOthers = App.Lion.Get("quit.others"); string quitReason = App.Lion.Get("quit.reason"); string quitTotal = App.Lion.Get("quit.total"); QuirkStart info = app.Connection.Info; info.Nick = "Tongue"; // join, others test(":maria!ip JOIN :#spreadbutter", joinOthers.Fill("maria", "ip", channel), "maria"); // join, self test(":Tongue!ip JOIN :#spreadbutter", joinSelf.Fill(channel), "tips"); // part, others, no reason test(":Tongues!ip PART #spreadbutter", partOthers.Fill("Tongues", "ip", channel), "roses"); // part, others, a reason test(":Tongues!ip PART #spreadbutter :Too angsty", partTotal.Fill(partOthers.Fill("Tongues", "ip", channel), partReason.Fill("Too angsty")), "angst"); // And now those that do not need no stinking channel. this.channel = null; // part, self, no reason test(":Tongue!ip PART #spreadbutter", partSelf.Fill("#spreadbutter"), "soulz"); // part, self, a reason test(":Tongue!ip PART #spreadbutter :Too verklempt", partTotal.Fill(partSelf.Fill("#spreadbutter"), partReason.Fill("Too verklempt")), "verklempt"); // quit, others, a reason test(":t!ip QUIT :Goodbye cruelle world", quitTotal.Fill(quitOthers.Fill("t", "ip"), quitReason.Fill("Goodbye cruelle world")), "poverty"); // quit, others, no reason test(":Tongues!ip QUIT", quitOthers.Fill("Tongues", "ip"), "slip"); // quit, self, a reason test(":Tongue!ip QUIT :Goodbye cruelle monkey", quitTotal.Fill(quitSelf, quitReason.Fill("Goodbye cruelle monkey")), "jane"); // quit, self, no reason test(":Tongue!ip QUIT", quitSelf, "short"); // should ignore test(":Tongue!ip MODE :+x", "estar en moda"); }
// Filters.Names has a hiddene dependency on the // Filter.Users.Instance static memeber, which we // seed here with anonymous construction in lieu // of DesiresAppControls. public Names(IAppControls app) : base(app) { new Users(app); this.app = app; this.uganda = app.UserList; test("{0} = #spreadbutterNamesFilter :@Sam maria jark ", "fresh", new string[] { "@Sam", "maria", "jark" }); }
public Privmsg(IAppControls app) { this.app = app; this.quirk = app.Connection; app.Buffer.Line += new LineDel(filter); app.Buffer.SelfLine += new LineDel(filter); speechAll = App.Lion.Get("speech.all"); actionAll = App.Lion.Get("action.all"); }
public Buffer(IAppControls app, Quirk quirk) { this.app = app; this.connection = quirk; Room id = new Room(quirk, null, app.LogBox); proust[app.Tabber.Current] = id; // Page.Buffering events. app.Tabber.Moved += new TabDel(MoveToTab); }
public Users(IAppControls app) : base(5) { this.app = app; Users.Instance = this; // Only broadcast quit messages to the channels // that actually contain the quitting user. // The `id` is "quit.[user]". See JPQ.cs. app.Buffer.Broadcast += (ref List <Room> tabs, string id) => { if (!id.StartsWith("quit.")) { return; } string quitter = id.Split('.')[1]; // Todo: Handle @+% fun via custom Contains method tabs = tabs.FindAll(t => Users.Instance[t].Contains(quitter)); }; }
public LogBoxFilters(IAppControls app) { buffer = app.Buffer; quirk = app.Connection; buffer.PreLine += new LineDel(hostName); buffer.PreLine += new LineDel(serverPrefix); buffer.Line += new LineDel(ping); buffer.SelfLine += new LineDel(selfJoin); buffer.SelfLine += (ref BufferData data) => data.Color = Color.DarkRed; buffer.Line += (ref BufferData data) => { // Strip mIRC colors. string line = data.Line; if (line.Contains("\u0003")) { line = mircRegex.Replace(line, ""); } }; }
public Who(IAppControls app) { // Hook me up to the command /w in addition to filtering // WHO commands; thus, Who serves as a dual purpose class. app.InputBox.Command += (cmd, arg) => { if ("w" != cmd) { return; } if (!app.CurrentChannel.IsChannel()) { return; } app.Buffer.Line += filterDel; app.Connection.Message("WHO " + app.CurrentChannel); }; app.Buffer.SelfLine += new LineDel(whoMessageFilter); filterDel = new LineDel(filter); this.app = app; }
public void Init(IAppControls appControls) { this.appControls = appControls; appControls.LoadMenu(); }
public static void PokeBuffer(IAppControls app, string line, LineDel girls) { app.Buffer.PostLine += girls; app.Buffer.AddLine(line); app.Buffer.PostLine -= girls; }
public void Init(IAppControls appControls, ISerializedCelestialSystemProvider csProvider) { this.csProvider = csProvider; this.appControls = appControls; }
public Query(IAppControls app) { this.app = app; this.introFilterDel = new LineDel(introFilter); app.InputBox.Command += new InputBox.CommandDel(filter); }
public WinLoseHandler(IAppControls appControls, IGameHudController gameHudController, ICelestialSystemSerializer serializer) { this.appControls = appControls; this.gameHudController = gameHudController; this.serializer = serializer; }
public Names(IAppControls app) { this.app = app; app.Buffer.Line += new LineDel(filter); }
public JoinPartQuit(IAppControls app) { this.app = app; quirk = app.Connection; app.Buffer.Line += new LineDel(filter); Instance = this; }