|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
any way of makeing script that reacts on topic change and returns topic on original one (that user provides in code, not that script has to see what was previous topic)
?
IceCapped
|
|
|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
Hoopy frood
Joined: Nov 2004
Posts: 842 |
raw 332:*:{ hadd -m $+(locktopic[,$network,]) $2 $3- }
on *:topic:#:{
if (%locktopic == 1) {
if ($me isop $chan) { topic $chan $hget($+(locktopic[,$network,]),$chan) }
}
else { hadd -m $+(locktopic[,$network,]) $chan $1- }
}
alias locktopic { set %locktopic $iif(%locktopic == 0,1,0) }
Last edited by Jigsy; 29/01/06 04:01 PM.
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
doesnt work ![smirk smirk](/images/graemlins/mirc/smirk.gif) does it have to be modified to work on mirc 6.03 ?
IceCapped
|
|
|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
Hoopy frood
Joined: Nov 2004
Posts: 842 |
Whats the problem with it?
(is %locktopic set to 1)
it also might help to do /topic #channame
Last edited by Jigsy; 29/01/06 04:44 PM.
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
%locktopic isnt set at all
IceCapped
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
well i and my friend are opped in channel and he changed the topic and nothing happened
IceCapped
|
|
|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
Hoopy frood
Joined: Nov 2004
Posts: 842 |
set
%locktopic 1
in variables then type /topic #chan
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
it starts to flood my channel and me with topic changes and cannot stop
IceCapped
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I don't know if hixxy's needs alterations to work in 6.03, but I just wrote and tested this in 6.03 menu channel {
&Topic Lock : topic.lock $network $chan
}
alias topic.lock {
if !$+(%,topic.,$1,.,$2) {
set $+(%,topic.,$1,.,$2) $chan($2).topic
echo -a Topic for $2 is locked
}
else {
unset $+(%,topic.,$1,.,$2)
echo -a Topic for $2 is unlocked
}
}
on @!*:topic:#:{
if $+(%,topic.,$network,.,$chan) {
.topic $chan $($+(%,topic.,$network,.,$chan),2)
}
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
i always get echo Topic for is unlocked
IceCapped
|
|
|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
Hoopy frood
Joined: Nov 2004
Posts: 842 |
Nothing wrong with your code, just variables are bad for storage like that ... other than that Its good :P
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
It worked fine in my testing. If the network has chanserv, you might want to see if the topiclock function is available through chanserv. I know I've seen it on some, but not others.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
im on Quakenet, not such features
IceCapped
|
|
|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
Hoopy frood
Joined: Nov 2004
Posts: 842 |
I think Q has a locktopic option ...
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
If you have Q in your channel, use the settopic command Sets both the current and default topics on the channel to that specified. Note: To use this command you must have +t on the channel. Usage: /MSG Q SETTOPIC <#channel> <topic> eg. /MSG Q SETTOPIC #[QN] This is a GREAT topic And Chanflags +f - Force topic Prevent people change the topic with /topic command - SETTOPIC is needed.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
dont have Q =) its private small channel
IceCapped
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Jigsy: Don't think...KNOW
LOL
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Then I'm out of ideas. I downloaded a copy of 6.03 simply to be able to help you by giving you code that works in 6.03, yet you say it doesn't work. The only reason I can see for that code to not work, is if you have a lot of variables already being set by other scripts, so that there's no room left for other variables.
As I said, I wrote & tested that script in 6.03 and it worked fine for me.
One last thing I just thought of, use the channel modes to restrict the setting of the topic to those with ops. That way only people with ops will be able to change the topic.
Last edited by RusselB; 29/01/06 05:34 PM.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
it is restricted =)
ok, i thank you both for effort, i try see whats wrong at me then.
IceCapped
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
code works =) and altho it works i always get "Topic for is unlocked"
and instead topic it returns just #channelname as topic.
Last edited by raZOR; 29/01/06 06:13 PM.
IceCapped
|
|
|
|
Joined: Mar 2005
Posts: 212
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 212 |
i have this left over from something
[code] on @*:Topic:#:{ if ((%ttopic != on) && ($nick != $me)) { topic # %topic set -u10 %ttopic on } } on *:text:!settopic *:#:{ if (($ulevel >= 4) && (%settop != on)) { set %topic $$2- msg # topic preset to %topic set -u10 %settop on } } on @*:text:!topic:#:{ if (($ulevel >= 4) && (%top != on)) { topic # %topic set -u10 %top on } }
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
sorry, not the thing i need ![smirk smirk](/images/graemlins/mirc/smirk.gif) but thanks for trying to help =)
IceCapped
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
This may be what you are looking for:
on @*:TOPIC:[color:red]#[/color]:{
if ($nick == $me) { set $+(%,topic.,$chan) $chan($chan).topic }
else {
echo 4 -at $nick Changed The Topic In $chan
notice $nick You may not change the topic in $chan
topic $chan $($+(%,topic.,$chan),2)
}
}
From this topic. If you change the topic it will be allowed, and saved into a variable. If someone else changes the topic, the script will set it back to the topic saved in the variable, and send them a notice that they aren't allowed to change the topic. This could be modified to kick a person if they try to change the topic too many times. You can replace the # with #channela,#channelb,#channelc,#etc. -genius_at_work
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
this code works great ! but i still get result (when topic returned) "#channel_name topic that was before" and if it is corrected 3 times then topic is: "#channel #channel #channel Topic" etc.. increasing #channel in topic ![smirk smirk](/images/graemlins/mirc/smirk.gif) any chance to return topic without #channel in it?
Last edited by raZOR; 30/01/06 12:09 AM.
IceCapped
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
It didn't do that for me. Maybe you have a /topic alias in one of your scripts. Try this:
on @*:TOPIC:#:{
if ($nick == $me) {
echo 4 -at You changed topic in $chan $+ , topic has been stored.
set $+(%,topic.,$chan) $1-
}
elseif ($($+(%,topic.,$chan),2)) {
echo 4 -at $nick changed topic in $chan $+ , restoring topic.
.notice $nick You may not change the topic in $chan
!topic $chan $($+(%,topic.,$chan),2)
}
else {
echo 4 -at $nick Changed topic in $chan $+ , no previous topic stored.
.notice $nick You may not change the topic in $chan
!topic $chan $me
}
}
The !topic will prevent any existing aliases from messing anything up. I also extended the code in case you haven't set a topic for that channel yet. It will set the topic to your nick if there is no topic saved for that channel. -genius_at_work
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
thaank you ! it works PERFECT !
wohoo im so happy now =)
IceCapped
|
|
|
|
|