Skip to content

Commit

Permalink
jjc: Add banlist handling
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronNGi committed Jan 18, 2020
1 parent 259d741 commit 49f217f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions jjc
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ cmd ~ /^30[56]$/ { on_away(); next }
cmd == "221" { on_modereply(); next }
cmd ~ /^32[49]$/ { on_modereply(); next }
cmd == "341" { on_inviting(); next }
cmd == "367" { on_banlist(); next }
cmd == "401" { on_nosuchnick(); next }
cmd == "433" { on_nickinuse(); next }
cmd == "432" { on_erroneous(); next }
Expand Down Expand Up @@ -1211,6 +1212,20 @@ function on_inviting()
print_out("You invited " param[nparam-1] " to " param[nparam])
}

function on_banlist( user, text)
{
text=param[2] " bans: " param[3]

if (nparam > 3) {
nsource=split(param[4], "[!@]", source)
user=get_nickuserhost()
text=text " by " param[4]
if (param[5] != "")
text=text " on " param[5]
}
print_out(text)
}

function on_nosuchnick( nick, nick_lc, text)
{
nick=param[nparam-1]
Expand Down

0 comments on commit 49f217f

Please sign in to comment.