mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
simple demonstration of chatroom integration of an outgoing socket
This commit is contained in:
parent
3371998372
commit
291bd308c2
3 changed files with 170 additions and 0 deletions
18
place/nemesis.c
Normal file
18
place/nemesis.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include <net.h>
|
||||
|
||||
#define CONNECT_TELNET "nemesis.de", 2000
|
||||
#define ON_CONNECT emit("guest\n");
|
||||
#define ON_ANY NET_PATH "tn/outgoing"::msg(source, mc, data, vars);
|
||||
|
||||
#include <place.gen>
|
||||
|
||||
parse(all) {
|
||||
// remove Nemesis' guest prompt.. why was i so funny
|
||||
// back then to implement several prompt chars?
|
||||
if (strlen(all) > 2 && all[1] == ' ' &&
|
||||
(all[0] == '#' || all[0] == '>')) all = all[2 ..];
|
||||
return ::parse(all);
|
||||
}
|
||||
|
||||
#echo Nemesis gateway loaded.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue