mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#140783 29/01/06 08:11 PM
Joined: Mar 2005
Posts: 212
N
Fjord artisan
Offline
Fjord artisan
N
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
}
}

#140784 29/01/06 09:55 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
sorry, not the thing i need smirk

but thanks for trying to help =)


IceCapped
#140785 29/01/06 11:19 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
This may be what you are looking for:
Code:
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

#140786 30/01/06 12:01 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
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


any chance to return topic without #channel in it?

Last edited by raZOR; 30/01/06 12:09 AM.

IceCapped
#140787 30/01/06 12:32 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
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:
Code:
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

#140788 30/01/06 12:39 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
thaank you !
it works PERFECT !

wohoo im so happy now =)


IceCapped
Page 2 of 2 1 2

Link Copied to Clipboard