mIRC Homepage
Posted By: WarlockW Help With Haltdef .. plz - 02/09/05 01:41 PM
Why Does This Not Work ?

on ^*:TEXT:*:#chan1,#chan2,#chan3:{
set %nsanenick $nick
set %bottxt2 $1-
if (!close isin %bottxt2) /iline @badbot 1 $nick - %bottxt2 | goto next
goto next
:next
if (%nsanenick isin BADBOT) /iline @badbot 1 $nick - %bottxt2 | goto stop
goto end
:stop
haltdef
goto end
:end
}


It Seems To ONLY work in #chan3 its weird ..
i wana stop the badbot text from being displayed in the room
darn thing says something every 2 secs lol HELP!

Is there a better faster way ?
Posted By: raZOR Re: Help With Haltdef .. plz - 02/09/05 02:34 PM
/ignore it?
Posted By: WarlockW Re: Help With Haltdef .. plz - 02/09/05 02:46 PM
i cant ...

i need to have the info .. just NOT in the channel window !

lol

HELP !
Posted By: dunkelzahn Re: Help With Haltdef .. plz - 02/09/05 02:59 PM
after an if don't forget to set {} or mIRC could think the second term is a new line

example :
Code:
 if (!close isin %bottxt2) iline @badbot 1 $nick - %bottxt2 | goto next
 

is same as :
Code:
if (!close isin %bottxt2) iline @badbot 1 $nick - %bottxt2
goto next

take this :
Code:
 if (!close isin %bottxt2) { iline @badbot 1 $nick - %bottxt2 | goto next }
 

PS: the goto is useless here

Your new code :
Code:
on ^*:TEXT:*:#chan1,#chan2,#chan3:{
set %nsanenick $nick
set %bottxt2 $1-
if (!close isin %bottxt2) { iline @badbot 1 $nick - %bottxt2 | goto next }
goto next
:next
if (BADBOT isin %nsanenick) { iline @badbot 1 $nick - %bottxt2 | goto stop }
goto end
:stop
haltdef
goto end
:end
}


But I don't understand what you want ! If you can explain better ....
[edit]the second if was reversed ! I'm in doubt it worked before !
Posted By: Riamus2 Re: Help With Haltdef .. plz - 02/09/05 03:00 PM
What about:

Code:
on ^*:text:*:#: {
  if ($nick == BADBOT) {
    iline @badbot 1 $nick - $1-
    haltdef
  }
}


That assumes you already have the @badbot window open. I didn't bother putting the code in to open it since you didn't have it in there either.

It will put the text from the bot in your window and nowhere else. If the bot doesn't change nicks, this should do what you need. If it does, make the if statement check multiple nicks using ||. It's set to work for all channels, but it's probably not likely to have that same nick in other channels you're in, unless it's a common nick on the bot. Just makes it easier that way rather than listing out the channels.
Posted By: WarlockW Re: Help With Haltdef .. plz - 02/09/05 03:37 PM
Sigh ..

Well It KINDA works ..
but .. it still isnt stoping the text in the channel window !

adds it fine to the @badbot < window

the haltdef dont seem to be working ..

any thoughts ?
Posted By: MikeChat Re: Help With Haltdef .. plz - 02/09/05 07:14 PM
there is no default to halt in an on text event.
what text are you trying to halt? the person who is inputting text in channel?

if you dont want to see the command in channel then the user who is sending a command should use a mesage or notice which can capture the text but not show the default.
Posted By: Riamus2 Re: Help With Haltdef .. plz - 02/09/05 07:40 PM
I'm thinking he can't control the bot and just wants text from the bot in one location and not see it in the channel. If that's not "default" text, is there a way to not display text sent in a channel or query?

I know you could manage to do it with saving/editing/loading the buffer, but that's very time consuming for the CPU to do constantly. There must be some way of doing it, I'd think.
Posted By: MikeChat Re: Help With Haltdef .. plz - 02/09/05 09:24 PM
hmm, I stand corrected

sample
Code:
on ^*:text:*:#:{
  echo -a $nick $1-
  haltdef
}

VS doing:

on *:text:*:#:{
  echo -a $nick $1-
  halt
}

the haltdef worked where the halt did not (for me in 6.16)
so if the haltdef is not working for you the way you want is there some other script that is handling channel text and conflicting?

Maybe change yours a bit:
on ^*:text:*:#: {
if ($nick == BADBOT) {
iline @badbot 1 $nick - $1-
haltdef
}
}
to
on ^*:text:*:#: {
if ($nick == BADBOT) {
iline @badbot 1 $nick - $1-
}
haltdef
}
Posted By: WarlockW Re: Help With Haltdef .. plz - 02/09/05 10:13 PM
yea must be a different text .. the bot is sending ...
or some other script .. blocking it ..

or something ..

cause it should work darn it !! But isnt frown

I just want it not to display the text of a bot .. in the channel window frown
Posted By: MikeChat Re: Help With Haltdef .. plz - 02/09/05 11:13 PM
Quote:

i wana stop the badbot text from being displayed in the room
darn thing says something every 2 secs lol HELP!


your original script and any that have been posted do not have the bot "say" anything. There must be another script that has the bot posting comments on some other event(s) related to the commands in the "on text"
Posted By: DaveC Re: Help With Haltdef .. plz - 03/09/05 03:22 AM
on ^*:TEXT:*:#chan1,#chan2,#chan3:{ if ((!close isin $strip($1-)) || ($nick == BADBOT)) { iline $badbot 1 $nick - $1- | haltdef } }
alias -l badbot { var %w = @badbot | if (!$window(%w)) { window -<insert your window parameters here> %w } | return %w }


If that doesnt work then, you likely have a another ON TEXT event that is displaying the bots/others messages in the channel.
If Thats the case its alot harder but not impossable to stop it displaying.
Posted By: WarlockW Re: Help With Haltdef .. plz - 03/09/05 03:39 AM

FINALLY !

OMG What A Pain ! lol

Thanks ! That Works smile)

laugh cool smile blush grin smirk
Posted By: MikeChat Re: Help With Haltdef .. plz - 03/09/05 05:05 AM
so.... you were trying to iline to a window that wasn't open???

good catch Dave, even though Riamus2 did indicate the window had to be opened first several posts back. Seems it wasnt.
Posted By: DaveC Re: Help With Haltdef .. plz - 04/09/05 04:15 AM
lol i wasnt even trying to catch that, thats just how i try to always refrence custom windows, i just found its easier than checking if they exist in different places in the script, just do it in the windowname identifier.
© mIRC Discussion Forums