|
|
vinyltm
|
vinyltm
|
I have a chat bot running that watches for key words in other chats it is logged in. It PM's me when my username is said in other channels. Now it also does it when i'm in my own channel so i get flooded with PM's. How would i set it to halt if the keyword is said in my channel... the script i am using is pretty basic on *:TEXT:*vinyltm*:#: { msg vinyltm SPYBOT $chan $nick : $1- }
|
|
|
|
Joined: Jul 2007
Posts: 1,124
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,124 |
on *:TEXT:*vinyltm*:#YourChannel: { Replace #YourChannel to the one you want the event to work in.
|
|
|
|
vinyltm
|
vinyltm
|
what about if i dont want it to work in there. I want it to work in every room but mine.
|
|
|
|
Joined: Jul 2007
Posts: 1,124
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,124 |
on *:TEXT:*vinyltm*:#: { if ($chan != #YourChannel) { msg vinyltm SPYBOT $chan $nick : $1- } } This will exclude your channel from being triggered.
|
|
|
|
vinyltm
|
vinyltm
|
Ok while using this i came across another problem. If i am in a channel it gets annoying if someone is talking to me and using my username. I see double. Any ideas on how to change the ($chan !=#channel) to make it so that if specific username is in the channel dont say it.
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
I suggest changing it to ($chan != #channel) && ($chan !isactive)
That way the script won't process the additional message for the channel you are currently chatting in.
|
|
|
|
asdfasdf
|
asdfasdf
|
I thought this might be an undocumented operator when I read your post but after testing it, it appears that it's not and therefore it should be $chan != $active.
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
My apologies. I didn't have the actual help file available for me to check when I responded. You are correct and I'm glad to see that you were able to figure out the correct way of getting what I was driving at.
|
|
|
|
vinyltm
|
vinyltm
|
on *:TEXT:*vinyl*:#: {
if ($chan != #vinyltm) && ($chan != $active) {
msg vinyltm [SPYBOT][ $chan $time ] $nick : $1-
}
}
This is what i have running. It is not working because i am assuming the TEXT is *vinyl* and not *vinyltm* now i tried changing $active to $vinyltm like i would have done for the #chan to #vinyltm. tested it in every possible way i could think of and its not working... anyone see what i am doing wrong? if the script doesnt trigger in a room i am in then the first ($chan != #vinyltm) is pointless anyway so that part could just be thrown out.
Last edited by vinyltm; 18/03/10 09:16 PM.
|
|
|
|
Joined: Jul 2007
Posts: 1,124
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,124 |
it gets annoying if someone is talking to me and using my username. I see double. Make it that if specific username is in the channel, dont say it. Try this: on *:text:*vinyl*:#: {
if ($chan != #vinyltm) && ($chan != $active) || (*vinyltm* !iswm $nick) {
msg vinyltm [SPYBOT][ $chan $time ] $nick : $1-
}
} Notice I added $nick != vinyltm By the way, you don't want to throw out $chan != #vinyltm
|
|
|
|
Joined: Jul 2007
Posts: 1,124
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,124 |
I changed the last if statement using iswm operator instead.
|
|
|
|
vinyltm
|
vinyltm
|
[quote] By the way, you don't want to throw out $chan != #vinyltm Servers are private and require a whitelisted account... no worries, but thank you.
|
|
|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
Your condition is unclear (even if mIRC might understand it as you wish here), you probably mean
if ($chan != #vinyltm) && (($chan != $active) || (*vinyltm* !iswm $nick)) {
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Oct 2004
Posts: 8,061
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,061 |
Actually, I'm thinking || should be &&. If the goal is for it to display as long as it's not in a specific channel AND it's not in the active channel AND it's not a specific nick. With OR, it will always display no matter what channel it's in as long as it's not a specific nick. Even adding parentheses, it will still always display in active as long as active isn't the specific channel and it's not a specific nick.
|
|
|
|
vinyltm
|
vinyltm
|
What i am basically trying to do is this: I have a bot running in multiple channels. I want a basic script that will notify a user if a key word is said. In this example i was using my username. The bot will notify the person the word was said in a private message. Now the problems i came across is while in your own channel you get flooded with PM's everytime the trigger is hit, so I want it to notice if the user is in the channel and to halt if they are.
|
|
|
|
Joined: Feb 2009
Posts: 133
Vogon poet
|
Vogon poet
Joined: Feb 2009
Posts: 133 |
better to use $istok or $findtok instead of "iswm" because if your Nick is bam and another is BamBoo then the condition if (*bam* iswm bamboo) return $true and that's wrong
|
|
|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
You might be right, I didn't really care about the topic here, just about the unclear condition 
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Feb 2009
Posts: 133
Vogon poet
|
Vogon poet
Joined: Feb 2009
Posts: 133 |
What i am basically trying to do is this: I have a bot running in multiple channels. I want a basic script that will notify a user if a key word is said. In this example i was using my username. The bot will notify the person the word was said in a private message. Now the problems i came across is while in your own channel you get flooded with PM's everytime the trigger is hit, so I want it to notice if the user is in the channel and to halt if they are. do you mean you want like a Highlight if someone mentions a nickname on a channel the bot will spy him and send a PM that contains to that nickname the word says?
|
|
|
|
|
|