mIRC Home    About    Download    Register    News    Help

Print Thread
#143663 26/02/06 09:50 PM
Joined: Jun 2005
Posts: 18
s1cK Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Jun 2005
Posts: 18
ok im building some bot ...
i cant connect him on my irc server because they put some stupid rutine check ..
Code:
(21:58:40) -Pricaonica- Routine check :) Please type:
(21:58:40) -Pricaonica- ********************************************************************************
(21:58:40) -Pricaonica- /msg s1cK 2550071296
(21:58:40) -Pricaonica- ********************************************************************************

the given number is random chosed
i nead some code for my soket bot to avoide this ..
i try with
Code:
on *:sockread:'sockname': {
  if (/msg isin %temp) {
    var %_a $numtok(%temp,160)
    .sockwrite -nt 'sockname' privmsg $me $gettok(%temp,%_a,160)
  }
}


buti it doesnt working frown
plz help


just the only iMage
#143664 26/02/06 10:30 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on 1:sockread:'sockname' :{
  if ($sockerr > 0) return
  :nextread
  sockread %temp
  if ($sockbr == 0) return
  if (/msg isin %temp) { 
    var %_a = $numtok(%temp,32) 
    .sockwrite -nt 'sockname' privmsg $me $gettok(%temp,%_a,32) 
  }
  goto nextread
}


-Andy

#143665 27/02/06 09:29 AM
Joined: Jun 2005
Posts: 18
s1cK Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Jun 2005
Posts: 18
tnx smile
but .. how do i know what my nick is smile
with $me it show curent nick thet i set up in mirc , not my socket bot nick.

oh one more thing ..
when i give command .. eg: .msg #wirus some text
I wanna bot say that.
it shows me this text

Code:
:s1cK!blax@i.tako PRIVMSG #wirus :.msg #wirus some text


I just want to get all after command .msg . In scripting that would be $2- , and here .. ???

HELP smile
p.s. sry for bad english blush


just the only iMage
#143666 27/02/06 02:53 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Not to be mean or anything, but if you don't know how to use sockets to make an IRC bot, then why don't you just make a regular mIRC bot? Khaled has already done all the work, and all you have to do is stuff like this (simple examples):

on *:TEXT:.msg & *:?:{
if ($nick != yournick) return
msg $2 $3-
}

But if you are set on using sockets, try looking at this site: http://www.mircscripts.org/showdoc.php?type=tutorial&id=1541

-genius_at_work


Link Copied to Clipboard