mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2004
Posts: 8
Z
zleepan Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: May 2004
Posts: 8
when im using on ^*:notice:*:?: it workes only on some notices.

i can cath it when it says
-`TIME-BoT`- hello
but it want catch when it says

<`TIME-BoT`> hello you
ive figured out that it has to do with the <> and --
because it will catch with -- but not with <>
the nick that notices me is `TIME-BoT`






Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

<`TIME-BoT`> hello you

that is when your bot private messages you, which is why the nickname is surrounded with < > (atleast by default).

WHen someone notices you, or you notice someone, the nick is surrounded with - -

So if you want to catch private messages and notices, you'll have to use:

on *:TEXT:*:?: if $nick == `TIME-BoT` { commands }
on *:NOTICE:*:?: if $nick == `TIME-BoT` { commands }

the question mark ? stands for private message.

Hope this will help you on your way,

Greets

Last edited by FiberOPtics; 28/05/04 08:53 PM.

Gone.
Joined: May 2004
Posts: 8
Z
zleepan Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: May 2004
Posts: 8
that didnt work because all this happens in the channel windows and not in an query/chat window






Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Lol,

it's easier for helpers on the board if you state exactly what you're trying to achieve. Had you said that you were capturing these messages from a channel then immediately I would have given you the following solution:

on *:TEXT:*:#: if $nick == `TIME-BoT` { commands }


This comes straight from the Help file ( /help on text ) :

The location where this event occurrs can be specified using:

? for any private message
# for any channel message
#mirc for any messages on channel #mirc
* for any private or channel messages

Greets


Gone.
Joined: May 2004
Posts: 8
Z
zleepan Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: May 2004
Posts: 8
here the situation
im on a channel and there is a bot
when i type !help the bot notices me with some text
and the nick is enclosed with -`TIME-BoT`^- " --"
and when i typ !time the bot notices me with some other text
but this time the nick is enclosed with <`TIME-BoT`> " <>"
the bot also msg the whole chan some text from time to time

what i want to achieve with my script is
that i want to echo the bot to a different channel
i cant use
on *:TEXT:*:#: if $nick == `TIME-BoT` { commands }
because i dont want to echo what the bot says to the -channel.
i only want to echo when the bot notices me and not to the whole channel.

ive tried this code

on ^*:notice:*:?: { /msg #spamchannel $1- }




it work when i type !help because then the bots nick is enclosed with --

but it want work then i type !time
because then the bots nick is enclosed with <>

why cant i echo the bot when the nick is enclosed with <>


regards zleepan



Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

as stated before:

By default (unless you've scripted the view differently):

When you /notice a person, or when a person /notice you, his nick is always enclosed by -nickname-

When you /msg a person the nick is enclosed by *nick* and when a person /msg you, then their nicks will be enclosed by <>


In other words:
Quote:

and when i typ !time the bot notices me with some other text
but this time the nick is enclosed with <`TIME-BoT`> " <>"

is impossible, because when a person notices you, you will see his nick enclosed by - - and not <>, so that must mean that it is not a notice to you.

However, mIRC doesn't care what the nicknames are enclosed with. You can simply capture the nick with the $nick identifier. So regardless of the view whether it be <>, * *, - -, as long as you are using the right event.

Indeed your script on *:NOTICE:*:?: if $nick == `TIME-BoT` { msg #spamchannel $1- }
works when you are being noticed, which is why the nickname is surrounded by --

And indeed your script won't work if the nick is enclosed by <> because that is not a notice to you but a private message.

The only advice I can give to you is the following:

In mIRC type /debug @debug

Then type !help in the channel.
Then type !time in the channel.

Wait until the bot has replied you with the !help and !time, and then type /debug off

That should show you exactly what happens when you type !help and !time, cuz mIRC will have captured the raw events, as shown in the @debug window.

Then post on the board here the contents of the @debug window.

I'm gonna be gone for a few hours now (studying) so I might not answer right away, but maybe someone else will get it.

Greets



Gone.
Joined: May 2004
Posts: 8
Z
zleepan Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: May 2004
Posts: 8

i did use the debug and found the problem :P

it was an prvmsg to the WHOLE chan
and i thaugs it was a notice or msg 4 me :P

so now i have to start over again with my script


regards zleepan

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hehe,

good that you finally found what it is now. /debug is useful smile

Well now you have all the pieces to the puzzle.

Start putting the puzzle together!

Greets

Last edited by FiberOPtics; 29/05/04 10:56 AM.

Gone.

Link Copied to Clipboard