Skip to content

Commit

Permalink
Create standard-replies.mrc
Browse files Browse the repository at this point in the history
Sloppy implementation of client-side Standard Replies https://ircv3.net/specs/extensions/standard-replies
  • Loading branch information
ValwareIRC authored Nov 27, 2022
1 parent 1b4d2c2 commit 01b54d0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions standard-replies.mrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on *:PARSELINE:in:*:{
tokenize 32 $parseline
if ($left($parseline,1) == @) {
tokenize 32 $2-
}
else tokenize 32 $1-
%s = $1
%cmd = $2
%code = $iif($left($3,1) !== $chr(58),(Error code: $3 $+ ),$null)
%context = $iif($left($4,1) !== $chr(58),( $+ $4 $+ ),$null)
if ($1 !== FAIL) && ($1 !== WARN) && ($1 !== NOTE) {
return
}
if (%s == FAIL) %c = 4
elseif (%s == WARN) %c = 7
elseif (%s == NOTE) %c = 8
tokenize 58 $1-
echo %c -at * %s $+ : $2 ( $+ %cmd $+ ) %code %context
}

0 comments on commit 01b54d0

Please sign in to comment.