alias caps { ; How many capital characters? set -l %caps $regex(caps,$strip($1-),/[A-Z]/g) ; How many non capitcal characters? set -l %norm $regex(caps,$strip($1-),/[^A-Z]/g) ; How many characters total? set -l %total $len($strip($1-)) ; Property assigned return values. ; caps = amount of capital characters. if ($prop == caps) { return %caps } ; ncaps = amount of non capital characters. elseif ($prop == ncaps) { return %norm } ; Else return normal percentage. else { return $calc((%caps / %total) * 100) } } ########### ON ^*:PONG:{ haltdef var %x = $calc($ctime - $2) titlebar %x $+ s lag if (%x >= 4) { echoall 4Lag Alert: You are %x seconds lagged to the server! } } ############ ;bad text protection alias matchword { if ($hfind($1,$2,1,n)) { set %reason $hget($1,$v1) | return 1 } return 0 } alias checktext { var %n = $numtok($strip($2-),32) while (%n) { if ($matchword($1,$gettok($strip($2-),%n,32))) { return $true } dec %n } return $false } alias badnickid if (!$hget(badnick&id)) .hmake badnick&id 10 | hadd badnick&id $1 $2- alias addswear if (!$hget(swear)) .hmake swear 10 | hadd swear $1 $2- on !@*:text:*:#: { if ($nick !isop $chan) && ($checktext(swear,$1-)) { ban -ku60 $chan $nick %reason } } on !@*:join:#: { if ($checktext(badnick&id,$nick)) || ($checktext(badnick&id,$remove($deltok($gettok($fulladdress,2,33),2,64),~))) { ban -ku60 $chan $nick %reason } } ;to add swear words :/addswear ex: /addswear cock dont say that word again plz.... ;to add badnick or id : /badnickid ex: /badnickid pussy pls change your nick/id be4 joined this channel ;you can create other aliases with the same format to match a non wilcard text ..like alias spam if (!$hget(spamwords)) .hmake spamwords 10 | hadd spamwords $1 $2- ;and then use if ($checktext(spamwords,$1-)) { blablbalbla..... etc ############################## alias global.find { set %ticks $ticks if ($window(@find) == $null) { window -l -t10,20 @find } aline @find Global address find by anthr4x (anthr4x.8m.com) aline @find - var %i = 0, %m = 0, %t = $chan(0) while (%i < %t) { inc %i 1 | aline @find $chan(%i) var %ii = 0, %tt = $ialchan($1,$chan(%i),0) while (%ii < %tt) { inc %ii 1 | inc %m 1 aline @find $ialchan($1,$chan(%i),%ii).nick $chr(9) $ialchan($1,$chan(%i),%ii).addr } aline @find - } aline @find Completed in $round($calc($calc($ticks - %ticks) / 1000),3) secs. Found %m matches of $1 $+ . unset %ticks } #################################### alias parse_url { if (?*tp://?*/* !iswm $1) return E_INVALID_STRING var %a = $replace($1-,$chr(32),$chr(44)),%scheme = $gettok(%a,1,58),%h1 = $mid(%a,$calc($pos(%a,/,2) + 1),$calc($pos(%a,/,3) - $pos(%a,/,2) - 1)) if (*:*@* iswm %h1) var %host = $gettok(%h1,2-,64),%user = $left(%h1,$calc($pos(%h1,:) - 1)),%pass = $mid(%h1,$calc($pos(%h1,:) + 1),$calc($pos(%h1,@) - $pos(%h1,:) - 1)) else var %host = %h1 var %path = $gettok($right(%a,$+(-,$calc($pos(%a,/,3) - 1))),1,63),%query = $gettok($gettok($right(%a,$+(-,$calc($pos(%a,/,3) - 1))),2-,63),1,35),%fragment = $gettok($gettok($right(%a,$+(-,$calc($pos(%a,/,3) - 1))),2-,63),2-,35) return $iif(!$prop,%a,% [ $+ [ $prop ] ]) } ######################################## ON *:START: { hmake seen 100 if ($isfile(seen.dat)) hload seen seen.dat } ON *:EXIT: if ($hget(seen)) hsave -o seen seen.dat ON *:TEXT:*:#: { hadd seen $nick text $address $chan $ctime $1- if ($1 = !seen) { if ( $2 == $me ) msg $chan $nick $+ , you found me! elseif ($2 ison $chan) { msg $chan $nick $+ , $2 is right here! } else { hadd seen $+(nseen.,$2,.,$nick) $nick $chan $address $ctime msg $chan $nick $+ , $seenparse($2) } } } ON *:ACTION:*:#: hadd seen $nick act $address $chan $ctime $1- ON *:QUIT: hadd seen $nick quit $address $ctime $1- on *:PART:#: hadd seen $nick part $address $chan $ctime $1- on !*:JOIN:#: { hadd seen $nick join $address $chan $ctime $1- nseen $nick } ON *:NICK: { hadd seen $nick nick $address $newnick $ctime nseen $newnick } ON *:KICK:#: { hadd seen $nick kicking $address $chan $ctime $knick $1- hadd seen $knick kick $address $chan $ctime $nick $1- } alias seen echo $colour(info) -a *** $seenparse($1) alias nseen { var %n3 = $1, %n = $hfind(seen,$+(nseen.,$1,.,*),0,w), %n2 while %n { %n2 = $hfind(seen,$+(nseen.,%n3,.,*),%n,w) tokenize 32 $hget(seen,%n2) .notice %n3 $1 ( $+ $3 $+ ) was looking for you on $2 $duration($calc($ctime - $4)) ago. hdel seen %n2 dec %n } } alias -l seenparse { var %x = $hget(seen,$1) if (!%x) return I have not seen $1 var %n = $1 tokenize 32 %x if ($1 = text) { return %n ( $+ $2 $+ ) was last seen talking on $3 $duration($calc($ctime - $4)) ago. } if ($1 = act) { return %n ( $+ $2 $+ ) was last seen acting on $3 $duration($calc($ctime - $4)) ago. } if ($1 = quit) { return %n ( $+ $2 $+ ) was last seen quiting $duration($calc($ctime - $3)) ago $iif($4,stating $+([,$4-,])) } if ($1 = part) { return %n ( $+ $2 $+ ) was last seen leaving $3 $duration($calc($ctime - $4)) ago $iif($5,stating $+([,$5-,])) } if ($1 = join) { return %n ( $+ $2 $+ ) was last seen joining $3 $duration($calc($ctime - $4)) ago. } if ($1 = nick) { return %n ( $+ $2 $+ ) was last seen changing nicks to $3 $duration($calc($ctime - $4)) ago. } if ($1 = kicking) { return %n ( $+ $2 $+ ) was last seen kicking $5 from $3 $duration($calc($ctime - $4)) ago with the reason: $6- } if ($1 = kick) { return %n ( $+ $2 $+ ) was last seen kicked from $3 by $5 $duration($calc($ctime - $4)) with the reason: $6- } }