Topic / Status / End Script

By aplive on Jul 02, 2010

Screenshots

This Script Can Set The Topic In A Channel With A Status And An End

--COMMANDS--
.t Topic
.s Status
.e End
.on Status: Moderation Is ON
.off Status: Moderation Is OFF

The Topic Is Seperated By /'s

EXAMPLE:
<Austin|BNC> .t "Hawkee"

  • BuzzLightyear has changed the topic to: "Hawkee" / We Need A HOP Please Private Message BuzzLightyear To Aply / Moderation Is OFF / Follow Austin On Twitter @apliveupdates

If You

on 1:text:.t *:#: {
  if ( $nick isop $chan || $nick ishop $chan ) {
    set %topic $2-
    topic $chan %topic /  %status / %end
  }
}
on 1:text:.s *:#: {
  if ( $nick isop $chan || $nick ishop $chan ) {
    set %status $2-
    topic $chan %topic /  %status / %end
}
on 1:text:.on:#: {
  if ( $nick isop $chan || $nick ishop $chan ) {
    set %status 8Moderation Is 9ON. 4You Must Have Voice To Speak.
    topic $chan %topic /  %status / %end
  }
}

on 1:text:.off:#: {
  if ( $nick isop $chan || $nick ishop $chan ) {
    set %status 8Moderation Is 4OFF
    topic $chan %topic /  %status / %end
  }
}

on 1:text:.e *:#: {
  if ( $nick isop $chan || $nick ishop $chan ) {
    set %end $2-
topic $chan %topic /  %status / %end
  }
}

Comments

Sign in to comment.
Jethro   -  Jul 22, 2010

You can also use the evaluation method:

$(|)
 Respond  
Aucun50   -  Jul 22, 2010

Did you try using $chr(124) not | ?

 Respond  
xplo   -  Jul 22, 2010

now try to add a topic with pipes in it --> |

like

Welcome on #chan | enjoy your stay | website www.google.com | Have fun!
errors since pipes (|'s) are evaluated as pipes

fix it :P

 Respond  
WorldDMT   -  Jul 04, 2010

i use $strip bcz of color bold underline text then for the condition

if $1 == .f

if user use color or bold this will return false or i can remove "tokenize 32 $strip($1-)" and change the condition with

if $strip($1) == .f

also that can be like this

on *:text:*:#:{
  tokenize 32 $strip($1-)
  if (!%f) && ($istok(.on-.off.-.t-.s-.e,$1,45)) && ($nick(#,$nick,oh)) {
    inc -u3 %f
    ...
    ...

theen the $trip is to remove all Ctrl+B, Ctrl+K, ect...

 Respond  
Jethro   -  Jul 03, 2010

Yeah, there are various ways one can use. :-) Now, if you tokenize $strip($1-), that sort of defeats the purpose of using the regex with the /S modifier, which strips the control codes. You can put $2 as \S+ and represent it as $2-. The \s means a space:> on $*:text:/^.((o(n|ff))|t\s\S+|s\s\S+|e\s\S+)\b/iS:#:{

 Respond  
WorldDMT   -  Jul 03, 2010

but when i read i see u can use only $reglm(1) with out $replace and put directly :on and :off
btw i have another method too

on $*:text:/^.((o(n|ff))|t|s|e)\b/iS:#:{
  if (!%f) && ($nick(#,$nick,oh)) {
    tokenize 32 $strip($1-)
    inc -u3 %f
    set %topic $iif($1 == .t,$2-)
    set %status $iif($1 == .s,$2-,$iif($istok(.on|.off,$1,124),8Moderation Is $iif($pos($1,f,1),4OFF,4You Must Have Voice To Speak.)))
    set %end $iif($1 == .e,$2-)
    if ($topic != %topic / %status / %end) topic # $v2
  }
}
 Respond  
Jethro   -  Jul 03, 2010

Very well. I got you clear on that.

 Respond  
WorldDMT   -  Jul 03, 2010

lol ok

you can remove the other thing in $replace put only $replace($regml(1),on,o,off,f) so u can remove "t,t,s,s,e,e"

 Respond  
Jethro   -  Jul 03, 2010

Something wrong, Mr. WorldDMT?

P.S. WorldDMT, I know you're French, but try your best to be descriptive or detail-oriented. Not just drop a line or "hint" to expect people to digest it mentally. This is not a guesswork. ;)

 Respond  
WorldDMT   -  Jul 03, 2010

goto $replace($regml(1),on,o,off,f)

 Respond  
Jethro   -  Jul 02, 2010
on $*:text:/^.((o(n|ff))|t|s|e)\b/iS:#:{
  if (!%f) && ($nick(#,$nick,oh)) { 
    inc -u3 %f
    goto $replace($regml(1),on,o,off,f)
    :o
    set %status 8Moderation Is 9ON. 4You Must Have Voice To Speak.
    topic $chan %topic /  %status / %end
    halt
    :f
    set %status 8Moderation Is 4OFF
    topic # %topic /  %status / %end
    halt
    :t
    set %topic $$2-
    topic # %topic /  %status / %end
    halt
    :s
    set %status $$2-
    topic # %topic /  %status / %end
    halt
    :e
    set %end $$2-
    topic # %topic /  %status / %end
    halt
  }
}
 Respond  
napa182   -  Jul 02, 2010

maybe think about using one on text event for ur snippet instead of 5

 Respond  
Aucun50   -  Jul 02, 2010

Your missing 2 end brackets.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.