err0r
Subject Matter Expert Member #20,793
are you using the latest version of mIRC.
I am not having that issue. If I understand what you are asking correctly. Let me know how this relates to what you are trying to do.
[07:07.a] err0r has changed the topic to: This is a test
[07:07.a] xerr0rx has changed the topic to: blah | another test | blah | hey
on ^*:topic:# { if ($hget(cprot,Topic $+ $chan) != $1-) { prop $chan TOPIC : $v1 } }
alias gettopic {
hadd -m cProt TOPIC $+ $active $chan($active).topic | echo -a $hget(cprot,Topic $+ $active)
}
Where is your problem occurring. on the hadd or the check
Edited Apr 23, 2010 12:47 PM by err0r
Get information about ircWx here
Travis
Historical / Guest
I have encountered a bug in my connection/script I need advice on...
For my channel protections (topic lock) I store the topic and modes for a channel to a hash on:JOIN. Well if a topic has a | or pipe in it, it makes the delimiters execute as commands.
For example:
hadd cProt MODES $+ # $chan(#).mode
.timer 1 1 hadd cProt TOPIC $+ # $chan(#).topic
Not sure why I use a timer on topic lol, but probably for a reason. Anyways, when a topic is "Blah | Help | Crap | Etc," mirc executes BLAH, HELP, CRAP, ETC.
How do i remove this without stripping out the pipes?
Try not using a timer.
err0r
Subject Matter Expert Member #20,793
i understand why you might do that in the onjoin .. but you are better off using the raw return to get the info when you join.
like raw 332 for topic and raw 324 for modes. It's a much better method for doing it than using on join:
if you just desire to use on join then you can do a timer on the alias instead of the actual event. Put the hadd in the alias and just timer to trigger the alias. Personally I would go with the raws though.
sorry i didn't notice this was in the general ircd area.. prop wouldn't work on it.
but why not just use chanserv to lock the modes/topic ????
Edited Apr 23, 2010 5:03 PM by err0r
Get information about ircWx here
Travis
Historical / Guest
Just make sure you don't evaluate the topic. /help $eval
err0r
Subject Matter Expert Member #20,793
might also try waiting til you are op'ed instead of trying to do it on $me join
on !*:topic:# { if ($hget(cprot,Topic $+ $chan) != $1-) { topic $chan $v1 } }
on *:op:#: { if ($opnick == $me) && ($hget(cprot,Topic $+ $chan) != $chan(#).topic) { topic $chan $v1 } }
lots of different ways you could do it. Personally i would just use chanserv's lock features.
Edited Apr 23, 2010 5:18 PM by err0r
Get information about ircWx here
Travis
Historical / Guest
timer still evaluates pipes ( | ).. I was not talking about !. The same example you posted unfortunately still evaluates the | symbol.
//.timer 1 1 echo -a hahha | hahha
/vs/
//echo -a hahha | hahha
returns the same result (error): "hahha - invalid command"
Use the $chr value for the pipe. I don't remember it off hand. Find it like this.
//echo -a . $asc(|)
Travis
Historical / Guest
The only reason for $! in a timer is to evaluate when the timer starts, not when it goes off. $chr(124) will always be evaluated as | regardless.
Travis
Historical / Guest
Yeah that makes sense. It evaluates the $chr(124) so that when it goes to send the echo it sees it as a pipe. Thanks.