mIRC Home    About    Download    Register    News    Help

Print Thread
O
oblivious
oblivious
O
I have a socket connected and commands setup for my socket bot , but everyone in the channel can type them as well and I don't want that. How do I stop this ?

Code:
   if ($2 == PRIVMSG) && ($remove($4,:) == .hop) {
    sockwrite -n $sockname PART $3
    sockwrite -n $sockname JOIN $3
  }  


so whenever someone types ".hop" my bot cycles the channel, I don't want that.

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Compare the contents of $nick with your nick. If it's you, then do the commands

O
oblivious
oblivious
O
I have already tried a few things and I can't find the right syntax.

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
the easiest way to do it is to give yourself a higher level
/help /guser

you add yourself to level 1000

then your on text event might would like

on 1000:text:*:*:{ code }

Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
Quote:
I have a socket connected...


Regular mIRC value-carrying event identifiers don't work in sockets (except $N and $rawmsg). You have to actually get the value of the nickname yourself using scripting.

Nickname!ident@host.mask.com PRIVMSG #channel :.hop

Code:
%nick = $gettok($1,1,33)
if ((%nick == you) && ($2 == PRIVMSG) && ($remove($4,:) == .hop)) hop $3


-genius_at_work

O
oblivious
oblivious
O
thank you very much


Link Copied to Clipboard