some stuff I wrote...

basic $chan prots :

CODE


on *:text:*:#: {

set %t $0

var %i 1

var %txt $1-

if (%t > 100) {
; number 100 is number of max words per line, it can be edited.

kick $chan $nick Max words per line in this chan is 100 ,you had %t words...

}

if ($len($1-) > 500) {
; number 500 is number of max characters per line, adjust it to suit you.

kick $chan $nick Max length per line in this chan is 500 characters,you had $len($1-) characters...

}

while (%i <= %t) {

if (#* iswm $gettok(%txt,%i,32)) && ($len($gettok(%txt,%i,32)) >= 2) {

kick $chan $nick No channel advertising -[ $+ $gettok(%txt,%i,32) $+ ]-
; Here it says what word was detected as channel name.

}

inc %i

}

}



mass modes :

CODE


alias modes {

if ($me isop $chan) {

var %num = $nick(#,0)

var %i 1

while (%i <= %num) {

var %tmpnick = $nick(#,%i)

if (%tmpnick != $me) {

var %tnk %vnikz

var %vnikz %tmpnick %tnk

}

inc %i

}

if ($1 == $null) {

echo -a  $+ $color(info) $+ [Modes] You must enter which mode to be used. (supported +/- vohb) -[ ch1zra@gmail.com ]-

}

if (+v isin $1-) {

mode # + $+ $str(v,$calc(%num - 1)) %vnikz

}

if (-v isin $1-) {

mode # - $+ $str(v,$calc(%num - 1)) %vnikz

}

if (+o isin $1-) {

mode # + $+ $str(o,$calc(%num - 1)) %vnikz

}

if (-o isin $1-) {

mode # - $+ $str(o,$calc(%num - 1)) %vnikz

}

if (+h isin $1-) {

mode # + $+ $str(h,$calc(%num - 1)) %vnikz

}

if (-h isin $1-) {

mode # - $+ $str(h,$calc(%num - 1)) %vnikz

}

if (+b isin $1-) {

mode # + $+ $str(b,$calc(%num - 1)) %vnikz

}

if (-b isin $1-) {

mode # - $+ $str(b,$calc(%num - 1)) %vnikz

}

}

}



simplest away system :

CODE


on *:input:*: {

if (/away isin $1) {

if ($2- == $null) {

nick %awnick

ame is back from : 4 $+ %awr

}

else {

set %awr $2-

set %awnick $me

nick $me $+ [AwaY]
; you can edit away tag as you wish

ame is away. Reason : 4 $+ %awr

}

}

}



usage : /away reason - to go away..
/away - with no reason to get back..


titlebar text animator :

CODE


alias tbar {

write -c titlebar.anim

var %tbr $1-

if (%tbr == $null) {

echo -a  $+ $color(info) $+ No titlebar text was entered, animating active titlebar text...

var %tbr $titlebar

}

var %ctr 1

var %len $len(%tbr)

while (%ctr <= %len) {

write titlebar.anim titlebar $right(%tbr,%ctr)

inc %ctr

}

while (%ctr >= 0) {

write titlebar.anim titlebar $right(%tbr,%ctr)

dec %ctr

}

while (%ctr <= %len) {

write titlebar.anim titlebar $left(%tbr,%ctr)

inc %ctr

}

set %timer.pause 400;pause between scrolls for timer

set %tmr $calc($lines(titlebar.anim) * 30 + %timer.pause)

.timer -m 0 %tmr .play -cs titlebar.anim 30

}



on *:start: {

.timer -m 0 %tmr .play -cs titlebar.anim 30

}



usage /tbar text you want to be displayed
if no text is provided, it will animate current titlebar text.

Ban protection :

CODE


on *:ban:#*: {

 if ($banmask iswm $address($me,5)) && ($me isop $chan) {

   mode $chan -b $banmask

   kick $chan $nick No ban $me $+ , $me angry... ( $+ %bkz $+ )

   inc %bkz

 }

}



destroy the auto thanx for voice biggrin.gif :

CODE


on *:VOICE:#:{

 if ($nick == $me) {

   set -u5 %autothnx 1

 }

}



on *:text:*:#: {

 if (%autothnx) &&  ($me isin $1-) {

   notice $nick Turn autothanx off 

   mode $chan -v $nick

 }

}



on *:action:*:#: {

 if (%autothnx) &&  ($me isin $1-) {

   notice $nick Turn autothanx off 

   mode $chan -v $nick

 }

}



smile.gif have phUn

 

 

 


Reply