Well this is my first script for you I hope you enjoy it, is simple but usefull, when you talk about a proper Nick Alert and not a normal one. Any comment or suggestion is welcome I'm new here
Channel #PlayerX
[21:16:04] Kevinzito
[21:16:12] * %Mex_LokoOo slaps Kevinzito around a bit with a large trout
In my status Window
[21:16:04] -> -Kevinzito- Hey Kevinzito Jc18 has nick alert you in #playerx
Channel #Miami-Dade
[21:16:04] -Kevinzito- Hey Kevinzito Jc18 has nick alert you in #playerx
I showed you the logs that shows that my script, isn't just working for status window, actually works for all windows ON that net.
on *:TEXT:*:#: {
if (YOUR_NICK_HERE* iswm $1) { notice $me Hey you, $nick has nick alert you in $chan
}
}
Gummo, i'm not sure what you're referring to :P the first 2 lines of code in my post are equivalent; one is Jethro_'s original line and the other is to show why that line is incorrect. the 3rd behaves just as your example does and is also correct
i realize that the condition i used might be quite confusing to understand :p perhaps this will help explain it:
if ($chan $cid == $active $activecid) checks if ($chan == $active) && ($cid == $activecid), ie. it checks the channel is the correct one. to check it is not the correct one, you need only negate that condition and the negation of == is !=
jaytea, it's supposed to be $true if the channel is different OR the cid is different. Otherwise you can't be in the same room on another server. The correct code would be this:
if (!%f) && ($istok($strip($1-),$me,32)) && (($chan != $active) || ($cid != $activecid)) {
Obviously you don't need that many () but added for clarity.
Jethro, it appears you might have made a small typo given that you have two pairs of parentheses surrounding that group of if conditions :p
if ((!%f && $istok($strip($1-),$me,32) && $chan != $active || $cid != $activecid)) {
is interpreted as:
if (((!%f) && ($istok($strip($1-),$me,32))) && ($chan != $active)) || ($cid != $activecid) {
meaning if $cid != $activecid, it would trigger regardless of the result of the previous conditions. the solution is of course to use extra () to group the last 2 conditions. there's also a neat little method you can use to combine them:
if (!%f) && ($istok($strip($1-),$me,32)) && ($chan $cid != $active $activecid) {
That goes to iswm too. I was just basing it off of what the author has. Perhaps use $istok($1-,$me,32)
on *:text:*:#:{
if ((!%f && $istok($strip($1-),$me,32) && $chan != $active || $cid != $activecid)) {
inc -u5 %f | noop $tip('Tray Tip', $nick has alerted you: $+ ,$1-,10)
}
}
I've included the $chan != $active because I don't see the point in being active while having someone call out to you. I also think it's better to take advantage of the $tip identifier for this.
-Edited as per Gummo's recommendation.