From: Andy Spencer Date: Thu, 25 Apr 2013 08:54:50 +0000 (+0000) Subject: Move .auth command to rhawk X-Git-Url: http://pileus.org/git/?p=~andy%2Frhawk;a=commitdiff_plain;h=dc0460bc02615f8cb640c421ca5dcc7e834cc20e Move .auth command to rhawk --- diff --git a/irc.awk b/irc.awk index c06cc8e..fe94a95 100644 --- a/irc.awk +++ b/irc.awk @@ -216,15 +216,3 @@ CMD == "JOIN" { USERS[FROM]["auth"] = _auth USERS[FROM]["real"] = MSG } - -/^\.auth/ { - _who = $2 ? $2 : FROM - if (_who in USERS) - say(" nick=" USERS[_who]["nick"] \ - " user=" USERS[_who]["user"] \ - " auth=" USERS[_who]["auth"] \ - " real=" USERS[_who]["real"] \ - " host=" USERS[_who]["host"]) - else - say("no auth info for " _who) -} diff --git a/rhawk b/rhawk index 8e17080..30e0f34 100755 --- a/rhawk +++ b/rhawk @@ -159,6 +159,19 @@ BEGIN { "reload: " uptime(_now - up_reload)) } +# Auth info +/^\.auth/ { + _who = $2 ? $2 : FROM + if (_who in USERS) + say("nick=" USERS[_who]["nick"] " " \ + "user=" USERS[_who]["user"] " " \ + "auth=" USERS[_who]["auth"] " " \ + "real=" USERS[_who]["real"] " " \ + "host=" USERS[_who]["host"]) + else + say("no auth info for " _who) +} + # Fortune TO == NICK && /^/ { extra = "" } TO == NICK && /^\.?fortune.*-o/ { extra = "-o" }