Archived
1
0
Fork 0
This repository has been archived on 2025-03-08. You can view files and clone it, but cannot push or open issues or pull requests.
b98/bot.b98
Julien Dessaux 21258ec3e6 Wrote a proper IRC parser
There are limitations : currently the parser would loop infinitely if
there were no \r\n (but the c wrapper would catch that), or if there
were no spaces, and it would miss the cmd and params starting char if they
were separated by more than one space.

Those caveats aside, it works great! And that's more than enough for now.
2016-08-17 19:22:54 +02:00

19 lines
1.4 KiB
Text

< v < > #;>:#,_e-j; "PASS my_secrets"da p300
<v < > #;>:#,_e-j; "NICK b98"da
;v;<; < > #;>:#,_e-j; "USER b98 0 0 b98"da
#####;len,pos,cmd,params,counter;
################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
v < p300< <
v_d03g2-4g-| > 13gv
~ vp320p310< |+1g31g4p31-1:<p30:p31:-1g30 <
:-0> ;>3g23pv;# <^ ,kg30<
0a3| 1v < ;
3p3>v_^v_13g33p23g:1+13p4g'0-#v_13g:1+13p4g'0-#v_13g:1+13p4g'1-#v_ad"tset# nioj"bk,^
g4p#1- 1-v < < <
:p0-3 3 >23g:1+13p4g'P-#v_13g:1+13p4g'I-#v_13g:1+13p4g'N-#v_13g:1+13p4g'G-#v_13g:1+13p4g' -#v_'O14p^
134:g' g' ;v < < < < <
+0g':g :g ^<
>^>^14 14
+p +p
13 13
>^ >^