mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#140763 29/01/06 03:50 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
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)

?

#140764 29/01/06 04:00 PM
Joined: Nov 2004
Posts: 822
J
Hoopy frood
Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
Code:
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.
#140765 29/01/06 04:22 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
doesnt work smirk
does it have to be modified to work on mirc 6.03 ?

#140766 29/01/06 04:42 PM
Joined: Nov 2004
Posts: 822
J
Hoopy frood
Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
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.
#140767 29/01/06 04:44 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
%locktopic isnt set at all

#140768 29/01/06 04:45 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
well i and my friend are opped in channel
and he changed the topic and nothing happened

#140769 29/01/06 04:48 PM
Joined: Nov 2004
Posts: 822
J
Hoopy frood
Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
set

%locktopic 1

in variables then type /topic #chan

#140770 29/01/06 04:58 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
it starts to flood my channel and me with topic changes
and cannot stop

#140771 29/01/06 05:02 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
I don't know if hixxy's needs alterations to work in 6.03, but I just wrote and tested this in 6.03
Code:
 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)
  }
}
 

#140772 29/01/06 05:05 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
i always get echo Topic for is unlocked

#140773 29/01/06 05:05 PM
Joined: Nov 2004
Posts: 822
J
Hoopy frood
Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
Nothing wrong with your code, just variables are bad for storage like that ... other than that Its good :P

#140774 29/01/06 05:08 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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.

#140775 29/01/06 05:09 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
im on Quakenet, not such features

#140776 29/01/06 05:22 PM
Joined: Nov 2004
Posts: 822
J
Hoopy frood
Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
I think Q has a locktopic option ...

#140777 29/01/06 05:26 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
If you have Q in your channel, use the settopic command
Quote:
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 smile


And Chanflags
Quote:
+f - Force topic
Prevent people change the topic with /topic command - SETTOPIC is needed.

#140778 29/01/06 05:27 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
dont have Q =)
its private small channel

#140779 29/01/06 05:27 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Jigsy: Don't think...KNOW

LOL

#140780 29/01/06 05:32 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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.
#140781 29/01/06 05:40 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
it is restricted =)

ok, i thank you both for effort, i try see whats wrong at me then.

#140782 29/01/06 06:12 PM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
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.
Page 1 of 2 1 2

Link Copied to Clipboard