shutup.py
· 645 B · Python
Raw
import znc
badwords = [
":,3",
":,,3",
":c",
":C",
":<",
"cry",
"cries",
"die",
"suicide",
"unalive",
"hate",
"malice",
"sigh"
]
class shutup(znc.Module):
description = "Strip away swee's depression shit because he deserves it."
module_types = [znc.CModInfo.GlobalModule]
def OnUserTextMessage(self, msg):
if self.GetUser().GetUsername() == "swee":
text = msg.GetText()
for word in text.split():
if word in badwords:
return znc.HALT
return znc.CONTINUE
| 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 |