summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index a1ef640..afc4bda 100644
--- a/main.go
+++ b/main.go
@@ -38,6 +38,11 @@ func (n *Notify) Write(p []byte) (int, error) {
func privmsg(room string) irc.HandlerFunc {
last := make(map[string]string)
return func(conn *irc.Conn, line *irc.Line) {
+ defer func() {
+ if r := recover(); r != nil {
+ log.Println("panic", r)
+ }
+ }()
switch t := line.Text(); {
case isFlood(t):
if line.Nick != conn.Me().Nick {