Permalink
Browse files

restrict access to badword db editing

  • Loading branch information...
1 parent 2b621cf commit c3a60073cf41879c0a4322e6e703d185b106b0b7 @auscompgeek committed Mar 13, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 badword.jsm
View
@@ -6,7 +6,7 @@
// PLEASE NOTE: if you edit the badwords list using the rc js command, use
// "rc js this.modules["badword"].parseList()" otherwise it will not work
-module.version = "4.2.3 (7 Mar 2012)";
+module.version = "4.2.4 (10 Mar 2012)";
module.count = {}; module.sfwChans = [];
module.parseList =
@@ -93,7 +93,8 @@ function onMsg(dest, msg, nick, host, at, serv)
{ nick = msgParts[1] ? msgParts[1].toLowerCase() : nick;
word = msgParts[2];
if (word && (this.badwords[word] || // is it a valid badword?
- this.badwords[(word = word[0].toUpperCase() + word.substring(1))]))
+ this.badwords[(word = word[0].toUpperCase() + word.substring(1))]) ||
+ host.match(aucgbot.prefs.suHosts)) // prevent access
if (msgParts[3])
{ if (!this.count[nick]) this.count[nick] = {};
if (!this.count[nick][word]) this.count[nick][word] = 0;

0 comments on commit c3a6007

Please sign in to comment.