mIRC Homepage

socket connections to mirc servers

Posted By: tecsatan

socket connections to mirc servers - 17/07/06 11:26 PM

I am trying to creat a socket connection to an IRC server. In time i wish to build my IRC bot to shadow me on the server in my mirc but running off a socket connection.

I have not been able to connect so i created this script to see what the problme is:-

alias open.socket {
sockopen conn1 irc.icq.com 6667
echo 4 Socket connection test started
}
on *:SOCKOPEN:conn1: {
if ($sockerr > 0) return
sockwrite -tn $sockname user $rand(a,z) $+ $rand(1,99) asdf asdf asdf
sockwrite -tn $sockname nick $rand(a,z) $+ $rand(1,9999)
sockwrite -tn $sockname join #thinktank
}
on *:sockread:conn1:{
if ($sockerr > 0) return
:nextread
sockread %temp
if ($sockbr == 0) return
if (%temp == $null) %temp = -
echo 4 %temp
goto nextread
}
alias close.socket {
sockclose conn1
echo 4 Socket connection test finished
}


This is the result i got:-

:irc-m06.icq.aol.com NOTICE AUTH :*** Looking up your hostname...
:IRC!IRC@irc-m06.icq.aol.com PRIVMSG e7386 :VERSION
:irc-m06.icq.aol.com 465 e7386 :*** Your GECOS (real name) is not allowed on this server (cradle) Please change it and reconnect
ERROR :Closing Link: e7386[81.155.192.207] (Your GECOS (real name) is banned from this server)

Does anyone know what I must do to be able to connect. E.g. how do i set a GECOS or (real name) on sockets?

I know its not my IP thats banend as I am connected to the server on my IP address.
Posted By: billythekid

Re: socket connections to mirc servers - 17/07/06 11:34 PM

well using /debug @debug before connecting i see

-> 216.14.48.141 NICK billythekid
-> 216.14.48.141 USER thekid "" "216.14.48.141" :btk

i guess its the USER section, btk being the "full Name" name set in mIRC.

so change your
sockwrite -tn $sockname user $rand(a,z) $+ $rand(1,99) asdf asdf asdf
to
sockwrite -tn $sockname user $rand(a,z) $+ $rand(1,99) $qt(asdf) $qt(asdf) : $+ GECOSofchoice
Posted By: tecsatan

Re: socket connections to mirc servers - 17/07/06 11:41 PM

I am now getting

:irc-m04.icq.aol.com NOTICE AUTH :*** Looking up your hostname...
:irc-m04.icq.aol.com 461 USER :Not enough parameters
:irc-m04.icq.aol.com 451 join :You have not registered
ERROR :Closing Link: b4824[81.155.192.207] (Ping timeout)


Script is now:

alias open.socket {
sockopen conn1 irc.icq.com 6667
echo 4 Socket connection test started
}
on *:SOCKOPEN:conn1: {
if ($sockerr > 0) return
sockwrite -tn $sockname user $qt($rand(a,z) $+ $rand(1,99)) $qt(asdf) $qt(asdf) : $+ pantsmaster
sockwrite -tn $sockname nick $rand(a,z) $+ $rand(1,9999)
sockwrite -tn $sockname join #thinktank
}
on *:sockread:conn1:{
if ($sockerr > 0) return
:nextread
sockread %temp
if ($sockbr == 0) return
if (%temp == $null) %temp = -
echo 4 %temp
goto nextread
}
alias close.socket {
sockclose conn1
echo 4 Socket connection test finished
}
Posted By: billythekid

Re: socket connections to mirc servers - 17/07/06 11:44 PM

sorry i edited mine to remove the first set of quotes while you were probably using the original, try it now, still don't know if it will work...but isn't it better to see different error messages sometimes! lol

also the IP addy in the thing is the ip of the server i'm connecting too, that may be required too


btk
Posted By: tecsatan

Re: socket connections to mirc servers - 17/07/06 11:58 PM

Still the same error message:-

:irc-m07.icq.aol.com NOTICE AUTH :*** Looking up your hostname...
:irc-m07.icq.aol.com 461 USER :Not enough parameters
:irc-m07.icq.aol.com 451 join :You have not registered

code now:

alias open.socket {
sockopen conn1 irc.icq.com 6667
echo 4 Socket connection test started
}
on *:SOCKOPEN:conn1: {
if ($sockerr > 0) return
sockwrite -tn $sockname user $rand(a,z) $+ $rand(1,99) $qt(asdf) $qt(asdf) : $+ tecsatan
sockwrite -tn $sockname nick $rand(a,z) $+ $rand(1,9999)
sockwrite -tn $sockname join #thinktank
}
on *:sockread:conn1:{
if ($sockerr > 0) return
:nextread
sockread %temp
if ($sockbr == 0) return
if (%temp == $null) %temp = -
echo 4 %temp
goto nextread
}
alias close.socket {
sockclose conn1
echo 4 Socket connection test finished
}



I am at a loss now. My experience with sockets only goes so fare and this is starting to go beyond me. mIRC help file don't help much ever, on the subject.
Posted By: genius_at_work

Re: socket connections to mirc servers - 18/07/06 04:15 AM

This might help:

http://www.mircscripts.org/showdoc.php?type=tutorial&id=1541

-genius_at_work
Posted By: piker

Re: socket connections to mirc servers - 13/03/07 03:13 AM

I believe your bot needs to reply to ping queries.
if you don't know how just run an endless timer to send some type of event to the server every 40 seconds so you don't get your bot disconnected.





irc.fusionchat.org #Chat,#mirc
© 2022 mIRC Discussion Forums