Last active 9 hours ago

swee revised this gist 9 hours ago. Go to revision

1 file changed, 27 insertions

shutup.py(file created)

@@ -0,0 +1,27 @@
1 + import znc
2 + badwords = [
3 + ":,3",
4 + ":,,3",
5 + ":c",
6 + ":C",
7 + ":<",
8 + "cry",
9 + "cries",
10 + "die",
11 + "suicide",
12 + "unalive",
13 + "hate",
14 + "malice",
15 + "sigh"
16 + ]
17 +
18 + class shutup(znc.Module):
19 + description = "Strip away swee's depression shit because he deserves it."
20 + module_types = [znc.CModInfo.GlobalModule]
21 + def OnUserTextMessage(self, msg):
22 + if self.GetUser().GetUsername() == "swee":
23 + text = msg.GetText()
24 + for word in text.split():
25 + if word in badwords:
26 + return znc.HALT
27 + return znc.CONTINUE
Newer Older