mIRC Home    About    Download    Register    News    Help

Print Thread
#99925 07/10/04 01:41 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
i trying to solve a problem.. when i type: /ctcp chat nick (to an eggdrop), then i get this in the debug:
Code:
-> server.address.com PRIVMSG nick :CHAT
[color:red]<- :nick!ident@host.com PRIVMSG nick2 :DCC CHAT chat 2130706433 3423[/color] (red is the bot that answer.)

and now this is a user sedning the same client a chat request:
Code:
<- :nick!ident@host.com NOTICE nick2 :DCC Chat (IP.addy)
[color:red]<- :nick!ident@host.com PRIVMSG nick2 :DCC CHAT chat 3642734861 2888[/color]

now to the wierd part.. i grab everything send to the client with: ctcp ^*:*:*:{ and that works just fine..
but the bots request wont act the same as the users request.. i have this code..
if ($1 == DCC) { haltdef }
that let a users chat request true without ignoring it.. but it wont let the bots request true.. and i tested to grap the value of $1 - $2 - $3 and set it as %var.. this is what i got..

%bot1 DCC ; $1
%bot2 CHAT ; $1
%bot3 chat ; $3

%user1 DCC ; $1
%user2 CHAT ; $1
%user3 chat ; $3

and what i can see, then the only thing that you can tell if comes from a bot or a user, thats the IP addy..
Code:
<- :nick!ident@host.com NOTICE nick2 :DCC Chat (IP.addy)

How come that mirc let the users DCC chat request true but not the bot's ?? confused i need to be able to haltdef the users DCC chat request but not the bot's.. but i cant see how that can be possible.. $1 - $2 - $3 return the same value's so cant use "if ($1 == DCC)" confused somone that have any idea on why mirc acting this way?? :tongue: cos if i use "haltdef" and have ignore on, then mirc wont let the bot true, but it let the users DCC chat true.. ignorelist is empty so mirc shouldent halt anything cos ignore is enabled.. confused

Or how can i identify:

<- :nick!ident@host.com PRIVMSG nick2 :DCC CHAT chat 3642734861 2888

its not a raw, but i get it in debug info.. so the thing i need to pic out from it is "PRIVMSG" (i think) confused

Last edited by sparta; 07/10/04 01:58 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#99926 07/10/04 11:16 PM
Joined: Jun 2004
Posts: 133
S
Vogon poet
Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
Err...i think you're going about this the wrong way for 1 haltdef is primarily for halting default text

userlevels are handy for stuff like this, say for instance you only wanted your allowed users to dcc chat you, lets for this example call that user mybot so in mirc lets add mybot by the command
/guser -a 10 mybot
mIRC will look up mybot's host and add mybot to your userlist
then you could use a remote like

ctcp ^+1:dcc chat *:*:{ halt }

what this does is stop default users with userlevel of 1 from chatting you.
There are probably other ways to do this too, but this may suit you

ScoT
#mIRC Undernet


Give a man a fish feed him for a day, Teach him to fish, feed him for life
#99927 08/10/04 11:14 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
the problem was that when ignore was enabled.. /ignore on , then the bot couldent DCC chat you, even tho the ignore list was empty, i solved it with a disable ignore when the input is "/ctcp botnick chat" .. and then a timer enable the ignore list again after XX seconds, and i would call this a bug or somthing, mirc should never ignore somthing that arent in ignore list, but it ignore this one.. i wouldent say anything if i had ignore on ctcp * or somthing like it, but as i said its empty totaly clean.. and the haltdef dont halt the dcc request, if it did then it wouldent work even when ignore is disabled..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard