mirror of
https://github.com/vishapoberon/vipak.git
synced 2026-04-05 20:42:26 +00:00
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:
parent
b8c7ed3f90
commit
1cac25c181
2 changed files with 193 additions and 16 deletions
12
test.Mod
12
test.Mod
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue