Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42e6ca8f26 | ||
|
|
304c645043 |
Generated
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
"isupport",
|
"isupport",
|
||||||
"list"
|
"list"
|
||||||
]
|
]
|
||||||
revision = "c1e97eb9d2e383147662ddd649fcab1bdaf295b4"
|
revision = "7233516f87eaa81dbf5772aeefa229ddb4aa8330"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/dgrijalva/jwt-go"
|
name = "github.com/dgrijalva/jwt-go"
|
||||||
|
|||||||
@@ -96,6 +96,12 @@ func handler(event *irc.Event, client *irc.Client) {
|
|||||||
text = util.RemoveNPCAttribution(event.Text)
|
text = util.RemoveNPCAttribution(event.Text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not dispatch empty messages.
|
||||||
|
if len(text) < 1 || len(nick) < 1 || len(kind) < 1 {
|
||||||
|
log.Println("Ignoring empty message from:", event.Nick)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
// Dispatch it.
|
// Dispatch it.
|
||||||
bot.handlePost(channel.Name(), ChannelPost{
|
bot.handlePost(channel.Name(), ChannelPost{
|
||||||
Account: account,
|
Account: account,
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ func TestRemoveNPCAttribution(t *testing.T) {
|
|||||||
Input: "((*Correction))",
|
Input: "((*Correction))",
|
||||||
Output: "((*Correction))",
|
Output: "((*Correction))",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Input: "((Remove :01 goofs!*))",
|
||||||
|
Output: "((Remove :01 goofs!*))",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, row := range table {
|
for i, row := range table {
|
||||||
|
|||||||
Reference in New Issue
Block a user