more handler procedures, for private, public, mentions, etc. also

parsing of the server line, getting host, message, recipient, from whom,
etc. -- noch
This commit is contained in:
norayr 2017-05-18 03:05:49 +04:00
parent b8c7ed3f90
commit 1cac25c181
2 changed files with 193 additions and 16 deletions

View file

@ -3,15 +3,12 @@ MODULE test;
IMPORT IRC, Out, Strings := ooc2Strings;
PROCEDURE clbk(VAR in: ARRAY OF CHAR);
PROCEDURE clbk(VAR msg : ARRAY OF CHAR);
BEGIN
Out.String("callback procedure is running, youhoo!"); Out.Ln;
Out.String("input:"); Out.Ln;
Out.String(in); Out.Ln;
Out.String(msg); Out.String("|"); Out.Ln;
Out.Ln;
END clbk;
PROCEDURE testBot;
@ -25,7 +22,10 @@ BEGIN
inst.nick := "vocbot";
inst.host := "irc.freenode.net";
inst.port := "6667";
inst.callback := clbk;
inst.callbackSimple := clbk;
NEW(channels, 1);
channels[0] := "#oberon";
IRC.setChannelList(inst, channels);