on *:TEXT:*:#:{
notice $me $regex($1-,%cusslist)
if $regex($1-,%cusslist) >= 1 {
inc %User $+ $nick 1
set %UserCount $var(User $+ $nick,1)
if %UserCount == 1 {
msg # %UserCount : Hey $nick please watch your language, this is your only warning.
}
}
}
Why will that not work?
Because you forgot the % in $var
?
on *:TEXT:*:#:{
notice $me $regex($1-,/\b( %cusslist )\b/gi)
if $regex($1-,/\b( %cusslist )\b/gi) >= 1 {
inc %User $+ $nick 1
set %UserCount $var(User $+ $nick,1)
if %UserCount == 1 {
msg # %UserCount : Hey $nick please watch your language, this is your only warning.
}
}
}
Why will that not work?
The regex format didnt execute nothing look in your quote I made the regex routine execute, but make sure your %cusslist is structured has mybadword|badword|whatever|blah|ok
Because you forgot the % in $var
?
% is not needed in command $var
alias try {
set %test ajwrwrworjwarwior
echo -a $var(test)
}
should return 1
Yeah, but I need to use $var() in order to get the name of the variable with the usersnick, since I can't seem to figure out how to get the value of that variable the same way I set it. $var just returns the name of the variable... still can't seem to get the value out of it. I don't need to echo it, I need to IF against it.
I don't need help on the regex, the %cusslist is the full regex. Just the variable issue.
Sorry dude miss read, it looks like you want the data instead of the name of the var, you see your using $var(variable,1) that will produce the name, now if you want the data $var(variable,1).value will do that
so $var($+(User,$nick),1).value or $var(User $+ $nick,1).value
same..
Thanks, i was not aware about that