Spike1506 Posted March 15, 2005 Report Share Posted March 15, 2005 Hi i wanna make a socket connection for IRC-D but i have this code now alias chatnetwerk { sockclose chatnetwerk sockopen chatnetwerk irc.chatnetwerk.nl 6667 } on *:sockopen:chatnetwerk:{ echo -a 4Je bent nu verbonden met de server! =) sockwrite -tn $sockname NICK $me sockwrite -tn $sockname USER Sockbot "Sockbot" "irc.chatnetwerk.nl" :Sockbot made by Spike1506 } on *:sockread:chatnetwerk:{ var %data sockread %data tokenize 32 %data echo -a Inkomende data van: $sockname : %data if ($1 == PING) { sockwrite -tn $sockname PONG $2 } } alias join { sockwrite -tn chatnetwerk JOIN : $+ $1- } but it doesnt show me a room window.. etc. etc. could someone help me please? Link to comment Share on other sites More sharing options...
Ozzy10 Posted March 15, 2005 Report Share Posted March 15, 2005 thats cause you have this alias alias join { sockwrite -tn chatnetwerk JOIN : $+ $1- } and its not called also why not just join mirc no need for socks for ircd, as mirc will join without Link to comment Share on other sites More sharing options...
vexation Posted March 15, 2005 Report Share Posted March 15, 2005 (edited) Hi i wanna make a socket connection for IRC-D but i have this code now ... but it doesnt show me a room window.. etc. etc. could someone help me please? alias chatnetwerk { var %p = 2000 | while (!$portfree(%p)) inc %p if ($status != disconnected) server -n scid $scon($scon(0)) server 127.0.0.1 %p socklisten chatnetwerk.listen. $+ $scon($scon(0)) %p sockopen chatnetwerk.srv. $+ $scon($scon(0)) irc.chatnetwerk.nl 6667 } on *:sockopen:chatnetwerk.srv.*:{ echo -a 4Je bent nu verbonden met de server! =) sockwrite -tn $sockname NICK $me $lf USER $me "s0ck.b0t" "irc.chatnetwerk.nl" :sockb0t_ } on *:socklisten:chatnetwerk.listen.*:{ scid $gettok($sockname,-1,46) sockaccept chatnetwerk.loc. $+ $cid sockclose $sockname } on *:sockread:chatnetwerk.srv.*:{ scid $gettok($sockname,-1,46) var %data sockread %data echo -a Inkomende data van: $sockname : %data sockwrite -n chatnetwerk.loc. $+ $gettok($sockname,-1,46) %data } on *:sockread:chatnetwerk.loc.*:{ scid $gettok($sockname,-1,46) var %d | sockread %d | tokenize 32 %d if ($gettok(%d,1,32) isin NICK USER) return else sockwrite -n chatnetwerk.srv. $+ $gettok($sockname,-1,46) %d } on *:sockclose:chatnetwerk.srv.*:{ sockclose chatnetwerk.loc. $+ $gettok($sockname,-1,46) | if ($scid($gettok($sockname,-1,46))) scid $gettok($sockname,-1,46) | disconnect } that should get you started. the server keeps banning me tho. u should check into that. and there's no need for that join alias because mirc will do it anyway with this code. but ozzy's right. what's the point in this? if you want a sockbot, it's because you want to do something faster than you can do it having mirc process it all. if you want mirc to process it and show you a channel window, etc. you should just use the /server command and let mirc take care of that for you. Edited March 15, 2005 by vexation Link to comment Share on other sites More sharing options...
Spike1506 Posted March 15, 2005 Author Report Share Posted March 15, 2005 Thanks a lot, and i just wanna just sockets there because i was thinking it would be a good way to learn sockets Link to comment Share on other sites More sharing options...
vexation Posted March 15, 2005 Report Share Posted March 15, 2005 oh, lol. you wanted to LEARN sockets. sorry, here i am doing it all for you... Link to comment Share on other sites More sharing options...
Spike1506 Posted March 15, 2005 Author Report Share Posted March 15, 2005 oh, lol. you wanted to LEARN sockets. sorry, here i am doing it all for you... i know but with reading your code, and trying other stuffs with it it's good enough to learn a little bit, so thanks a lot Link to comment Share on other sites More sharing options...
Ronan Posted October 27, 2005 Report Share Posted October 27, 2005 hmzzz , need to learn that to sockets o.O Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now