Basic — File Browser
Basicv09272000 / Basicv09272000 / SYS / lists.ini
lists.ini — 47.37 KB — Download this file
[script]
n0=alias lists if ($script(dialog.ini) == $null) .load -rs sys\dialog.ini | dialog -m lists lists
n1=on *:dialog:lists:init:*:{
n2= if (%dialog_lists_num isnum 450-457) .timer -m 1 1 did -f $dname %dialog_lists_num
n3= fkeyinit $dname
n4= if ($server) did -e $dname 4
n5= if ($i(main,nickkick) == on) did -c $dname 34
n6= if ($_isfile(sys\quits.txt)) loadbuf -o $dname 53 $ifmatch | did -z $dname 53
n7= var %x = 67 | while (%x <= 77) { did -a $dname %x $iif($kmsg($mkmsg(%x)),$kmsg($mkmsg(%x)),<Default>) | inc %x }
n8= if ($i(spam,toggle) == on) did -c $dname 84
n9= if ($i(spam,words)) didtok $dname 83 32 $ifmatch
n10= if ($words) didtok $dname 24 32 $ifmatch
n11= if ($_readini(lame.ini,lamenicks,n0)) didtok $dname 31 32 $ifmatch
n12= if ($_readini(words.ini,word.toggle,toggle)) did -c $dname 98
n13= did $iif($_isfile(sys\spam.txt),-e,-b) $dname 82,85
n14= if ($i(messages,quits) == random) did -c $dname 86
n15= if ($i(messages,kicks) == random) did -c $dname 89
n16= if (%DefaultKickMessage) did -a $dname 88 $ifmatch
n17= .timer -m 1 0 adl $chr(124) listlogs $chr(124) _ajoin_refresh
n18=}
n19=; customizable function keys
n20=; $fkey(command) - $fkey(/resend) would return the function key for /resend
n21=alias fkey {
n22= var %f = $readini -n sys\fkeys.dat $remove($1,/) fkey
n23= var %f2 = $readini -n sys\fkeys.dat $1 fkey
n24= return $iif(%f,%f,$iif(%f2,$ChangeCase(%f2),$upper($1)))
n25=}
n26=alias -l ChangeCase {
n27= if (c* iswm $1) return Ctrl+ $+ $upper($mid($1,2))
n28= if (s* iswm $1) return Shift+ $+ $upper($mid($1,2))
n29= return $upper($1)
n30=}
n31=; $func(fkey) - $func(F1) would return the command used for F1
n32=alias func return $readini sys\fkeys.dat $1 com
n33=alias fcom {
n34= var %i = 1, %array = cf? cf?? f? sf? sf?? ctrl* shift*
n35= while ($gettok(%array,%i,32)) {
n36= if ($ifmatch iswm $fkey($1)) return Press
n37= inc %i
n38= }
n39= return Type
n40=}
n41=alias fset {
n42= if ($3) {
n43= writeini -n sys\fkeys.dat $1 $2 $3-
n44= if ( $read -ns [ $+ [ $3 ] ] sys\fkeys.txt ) writeini sys\fkeys.dat $3 fkey $1
n45= }
n46= else remini sys\fkeys.dat $1 $$2
n47=}
n48=alias -l fkeyinit {
n49= var %i = 1 | while (%i <= 12) { did -a $1 460 F $+ %i | inc %i }
n50= if ($_isfile(sys\fkeys.txt)) {
n51= var %f = $ifmatch
n52= loadbuf -o $1 464 %f
n53= loadbuf -o $1 465 %f
n54= loadbuf -o $1 466 %f
n55= }
n56= did -c $1 460 1 | fkeysclick $1 1
n57=}
n58=alias -l fset² {
n59= var %tmp = $did(lists,$1)
n60= if (%tmp == $null) fset $2 com
n61= else {
n62= fset $2 com %tmp
n63= if ($didwm(lists,$1,%tmp) == 0) did -a lists $1 %tmp
n64= }
n65=}
n66=alias -l Func_It {
n67= if ($1 == 464) return $did(lists,461)
n68= if ($1 == 465) return $remove($did(lists,462),trl+)
n69= if ($1 == 466) return $remove($did(lists,463),hift+)
n70=}
n71=alias -l mkmsg {
n72= goto $1
n73= :67 | return Bad_nick/hostmask
n74= :68 | return Clone_offence
n75= :69 | return Excess_caps
n76= :70 | return Lame_nick
n77= :71 | return Long_word_abuse
n78= :72 | return Nick_flood
n79= :73 | return Notice_flood
n80= :74 | return Public_flood
n81= :75 | return Repeat_flood
n82= :76 | return Invite_flood
n83= :77 | return Swearing
n84=}
n85=alias -l _rn1 return $replace($1,93,EFNet,94,Undernet,95,IRCNet,96,DALNet,97,Unknown)
n86=alias -l _rn2 return $replace($1,EFNet,93,Undernet,94,IRCNet,95,DALNet,96,Unknown,97)
n87=alias _newqm write -ds $+ $mkmsg($1) sys\kicks.txt | if ($2) write sys\kicks.txt $mkmsg($1) $2- | else did -a lists $1 <Default>
n88=dialog ajr {
n89= title "Server identification removal"
n90= option dbu
n91= size -3 -3 150 50
n92= text %.text, 1, 5 5 100 30
n93= button "&OK", 2, 110 3 35 12, ok default
n94= button "&Cancel", 3, 110 18 35 12, cancel
n95= combo 4, 5 35 140 100, autohs drop result
n96=}
n97=on *:dialog:ajr:init:*:if ($i($bind(network_,$ajoin.getnetwork),s)) didtok -a ajr 4 32 $ifmatch | did -f ajr 4
n98=on *:dialog:lists:sclick:468:.timer -m 1 0 ajoin.addserver.1 $_rn1($ajoin.getnetwork)
n99=on *:dialog:lists:sclick:469:.timer -m 1 0 ajoin.remserver.1 $_rn1($ajoin.getnetwork)
n100=alias -l ajoin.ajr { %.text = $1- | return $dialog(ajr,ajr,-3) }
n101=alias -l ajoin.getnetwork { var %n = 93 | while (%n <= 97) { if ($did(lists,%n).state) return $did(lists,%n) | inc %n } }
n102=alias -l ajoin.addserver.1 { if ($inputbox(Enter a server to be recognized as a server of [ $1 ] network."Server-network identification)) ajoin.addserver.2 $1 $ifmatch | if ($dialog(lists)) dialog -v lists }
n103=alias -l ajoin.addserver.2 { _set network_id $2 $1 | _set $bind(network_,$1) s $addtok($i($bind(network_,$1),s),$2,32) | .timer -m 1 0 s.err $2 will now be recognized as a server of $1 network."Network identification }
n104=alias -l ajoin.remserver.1 { if ($ajoin.ajr(Select a server to remove from [ $1 ] network.)) ajoin.remserver.2 $1 $ifmatch | if ($dialog(lists)) dialog -v lists }
n105=alias -l ajoin.remserver.2 { _set network_id $2 | _set $bind(network_,$1) s $remtok($i($bind(network_,$1),s),$2,32) | .timer -m 1 0 s.err $2 will no longer be recognized as a server of the network $1 $+ ."Network identification }
n106=on *:dialog:lists:edit:*:{
n107= if ($did == 18) {
n108= if ($did(15) == &Update) return
n109= if ($did($did)) did -e $dname 17
n110= else did -b $dname 17
n111= }
n112= if ($did isnum 464-466) .timer_fkd $+ $did 1 1 fset² $did $Func_It($did)
n113= if ($did isnum 67-77) .timer.did $+ $did 1 1 _newqm $did $did($did)
n114=}
n115=on *:dialog:lists:dclick:*:{
n116= if ($did(6,$did(6).sel)) set %f addon\ $+ $ifmatch
n117= if (($did == 6) && ($nopath(%f))) run notepad %f
n118= if ($did == 14) {
n119= var %i = 1
n120= while ($nopath( [ $logdir $+ [ $did(14,$did(14,%i).sel) ] ] )) {
n121= var %f = " $+ $logdir $+ $did(14,$did(14,%i).sel) $+ "
n122= run $iif($file($shortfn(%f)).size <= 35000,notepad,wordpad) %f
n123= inc %i
n124= }
n125= }
n126=}
n127=on *:dialog:lists:sclick:*:{
n128= var %d = $did
n129= if (%d isnum 450-457) %dialog_lists_num = %d
n130= if (%d == 102) {
n131= var %t = $dialog(lists).tab
n132= if (%t == 457) help function_keys
n133= if (%t == 455) help kick_messages
n134= if (%t == 456) help spam_control
n135= if (%t == 454) help quit_messages
n136= if (%t == 453) help banned_words_&_nicks
n137= if (%t == 452) help autojoin_list
n138= if (%t == 451) help log_manager
n139= if (%t == 450) help addon_manager
n140= }
n141= if (%d == 90) notepad sys\kicks.txt
n142= if (%d == 89) _set messages kicks $iif($did(%d).state,random,blank)
n143= if (%d == 86) _set messages quits $iif($did(%d).state,random,blank)
n144= if (%d == 24) {
n145= var %.l = $_readini(words.ini,$did(24,$did(24).sel),channels)
n146= did -r $dname 26
n147= if (%.l) did -a $dname 26 $ifmatch
n148= }
n149= if (%d == 28) {
n150= if (($did(24)) && ($did(26))) {
n151= writeini sys\words.ini words n0 $addtok($words,$did(24),32)
n152= writeini sys\words.ini $did(24) channels $did(26)
n153= var %q = FALSE, %b = 1
n154= while ($did(24,%b)) {
n155= if ($did(24,%b) == $did(24)) { var %q = TRUE | break }
n156= inc %b
n157= }
n158= if (%q == FALSE) did -a $dname 24 $did(24)
n159= did -u $dname 24 0
n160= did -r $dname 26
n161= }
n162= }
n163= if ((%d == 29) && ($istok($words,$did(24),32))) {
n164= .remword $did(24)
n165= did -r $dname 26
n166= did -d $dname 24 $did(24).sel
n167= did -u $dname 24 0
n168= }
n169= if (%d == 31) update.lamechans $did(31,$did(31).sel)
n170= if (%d == 35) {
n171= if (($did(31)) && ($did(33))) {
n172= var %.tmp1 = $_readini(lame.ini,lamenicks,n0), %d = FALSE, %b = 1
n173= writeini sys\lame.ini lamenicks n0 $addtok(%.tmp1,$did(31),32)
n174= writeini sys\lame.ini $did(31) channels $did(33)
n175= while ($did(31,%b)) {
n176= if ($did(31,%b) == $did(31)) { var %d = TRUE | break }
n177= inc %b
n178= }
n179= if (%d == FALSE) did -a $dname 31 $did(31)
n180= did -u $dname 31 0
n181= did -r $dname 33
n182= }
n183= elseif (($did(31)) && ($did(33) == $null)) .unlame $did(31)
n184= }
n185= if ((%d == 36) && ($did(31))) .unlame $did(31)
n186= if (%d == 34) _set main nickkick $iif($did(34).state,on,off)
n187= if ($did(6,$did(6).sel)) set %f addon\ $+ $ifmatch
n188= if ((%d == 6) && ($nopath(%f))) {
n189= var %loaded = $iif((($script($nopath(%f))) || ($alias($nopath(%f)))),1,0)
n190= did $iif(%loaded,-e,-b) $dname 3
n191= did $iif(%loaded,-b,-e) $dname 4
n192= did $iif(%loaded,-b,-e) $dname 5
n193= did -r $dname 7
n194= did -a $dname 7 $adninf(%f)
n195= }
n196= if ((%d == 5) && ($nopath(%f))) {
n197= if (alias isin $_addon(%f)) {
n198= .load -a %f
n199= did -b $dname 4,5
n200= did -e $dname 3
n201= did -r $dname 7
n202= did -a $dname 7 $adninf(%f)
n203= }
n204= else .timer 1 0 lq -a %f
n205= }
n206= if ((%d == 4) && ($nopath(%f))) {
n207= if (remote isin $_addon(%f)) {
n208= .load -rs %f
n209= did -b $dname 4,5
n210= did -e $dname 3
n211= did -r $dname 7
n212= did -a $dname 7 $adninf(%f)
n213= }
n214= else .timer 1 0 lq -s %f
n215= }
n216= if ((%d == 3) && ($nopath(%f))) {
n217= if (($script($nopath(%f))) || ($alias($nopath(%f)))) {
n218= .unload -rs $ifmatch
n219= did -b $dname 3
n220= did -e $dname 4,5
n221= did -r $dname 7
n222= did -a $dname 7 $adninf(%f)
n223= }
n224= }
n225= if ((%d == 2) && ($nopath(%f))) notepad %f
n226= if (%d == 10) {
n227= var %i = 1
n228= while ($nopath( [ $logdir $+ [ $did(14,$did(14,%i).sel) ] ] )) {
n229= var %f = $logdir $+ $did(14,$did(14,%i).sel)
n230= run $iif($file($shortfn(%f)).size <= 35000,notepad,wordpad) %f
n231= inc %i
n232= }
n233= }
n234= if (%d == 11) if ($did(14,1).sel) .timer 1 0 remlog
n235= if (%d == 12) { var %f = $logdir $+ $did(14,$did(14,1).sel) | if ($nopath(%f)) if ($server) .timer 1 0 sendlog %f }
n236= if (%d == 14) {
n237= did -e $dname 12
n238= var %f = $did(14,$did(14).sel))
n239= did -o $dname 13 1 %f ( $+ $_lof( [ $logdir $+ [ %f ] ] ) $+ )
n240= }
n241= if (%d == 21) _set main autojoin $iif($did(21).state,on,off)
n242= if (%d == 19) { did -r $dname 18 | did -e $dname 16,15 | did -b $dname 17 | did -o $dname 15 1 Edit &Password }
n243= if (%d == 17) {
n244= if ($did(18)) {
n245= var %.network = $i(main,last.ajoin), %c = $gettok($did(18),1,32)
n246= if ($istok($i(autochans,%.network),%c,44) == $false) .ajoin %.network $did(18)
n247= did -r $dname 18
n248= }
n249= did -b $dname 17
n250= }
n251= if (%d == 16) {
n252= if ($did(19,$did(19).sel)) {
n253= var %c = $gettok($ifmatch,1,32)
n254= .rjoin %c $i(main,last.ajoin)
n255= did -d $dname 19 $did(19).sel
n256= did -b $dname 15,16,17
n257= }
n258= }
n259= if (%d == 15) {
n260= if (($did(15) == Edit &Password) && ($did(19,$did(19).sel))) {
n261= did -a $dname 18 $did(19,$did(19).sel)
n262= did -d $dname 19 $did(19).sel
n263= did -b $dname 16,17
n264= did -o $dname 15 1 &Update
n265= did -e $dname 15
n266= }
n267= elseif ($did(18)) {
n268= .ajoin $i(main,last.ajoin) $did(18)
n269= did -r $dname 18
n270= did -b $dname 16,17
n271= did -o $dname 15 1 Edit &Password
n272= did -e $dname 15
n273= }
n274= }
n275= if (%d == 50) {
n276= if ($did(49)) {
n277= var %.quit = $ifmatch
n278= if (($gettok(%.quitline,1,32) == EDIT) && ($gettok(%.quitline,2,32) isnum)) {
n279= write -l [ $+ [ $gettok(%.quitline,2,32) ] ] sys\quits.txt %.quit
n280= did -i $dname 53 $gettok(%.quitline,2,32) %.quit
n281= unset %.quitline
n282= }
n283= else { write sys\quits.txt %.quit | did -a $dname 53 %.quit }
n284= did -r $dname 49
n285= }
n286= }
n287= if (%d == 54) { if ($did(53,$did(53).sel)) { set %.quit $ifmatch | .timer 1 0 _qquit } }
n288= if (%d == 55) { if ($did(53,$did(53).sel)) { did -a $dname 49 $ifmatch | set %.quitline EDIT $did(53).sel | did -d $dname 53 $did(53).sel } }
n289= if (%d == 79) { if ($did(78)) { var %.snew = $ifmatch | _set spam words $addtok($i(spam,words),%.snew,32) | did -a $dname 83 %.snew | did -r $dname 78 } }
n290= if (%d == 81) {
n291= if ($did(83,$did(83).sel)) {
n292= var %.srem = $ifmatch, %.sold = $i(spam,words)
n293= if ($sub($numtok(%.sold,32),1)) _set spam words $remtok(%.sold,%.srem,32)
n294= else _unset spam words
n295= did -d $dname 83 $did(83).sel
n296= }
n297= }
n298= if ((%d == 82) && ($_isfile(sys\spam.txt))) {
n299= var %f = sys\spam.txt
n300= window -kl +l @Spam.log $winpos(@Spam.log) @Spam $winfont(@Spam.log)
n301= loadbuf @Spam.log %f
n302= window -b @Spam.log
n303= }
n304= if (%d == 84) _set spam toggle $iif($did(84).state,on,off)
n305= if (%d == 85) if ($_isfile(sys\spam.txt)) .timer -m 1 0 if ( $+ $!?!="Are you sure you want to delete the spam log?") remove sys\spam.txt
n306= if (%d isnum 93-97) if ($did($did).state) _ajoin_refresh $did
n307= if (%d == 98) writeini sys\words.ini word.toggle toggle $did(98).state
n308= if (%d == 464) fset $did(461) com $gettok($did(464),1,32)
n309= if (%d == 465) fset $remove($did(462),trl+) com $gettok($did(465),1,32)
n310= if (%d == 466) fset $remove($did(463),hift+) com $gettok($did(466),1,32)
n311= if (%d == 460) fkeysclick $dname
n312= if (%d == 1) {
n313= if ($did(88)) set %DefaultKickMessage $ifmatch
n314= else unset %DefaultKickMessage
n315= if ($dialog(settings) == $null) .unload -rs $script(dialog.ini)
n316= }
n317=}
n318=alias -l fsel {
n319= ; /fsel <id>
n320= if ($func($Func_It($1))) {
n321= var %k = * $+ $ifmatch $+ *
n322= if ($didwm(lists,$1,%k)) did -c lists $1 $ifmatch
n323= else { did -a lists $1 $remove(%k,*) | did -c lists $1 $didwm(lists,$1,$remove(%k,*)) }
n324= }
n325= else did -u lists $1
n326=}
n327=alias -l fkeysclick {
n328= var %f = F $+ $did(460).sel | var %f1 = c $+ %f | var %f2 = s $+ %f
n329= did -o $1 461 1 %f | did -o $1 462 1 Ctrl+ $+ %f | did -o $1 463 1 Shift+ $+ %f
n330= var %i = 464 | while (%i <= 466) { fsel %i | inc %i }
n331=}
n332=menu @Spam {
n333= &Delete log:{
n334= if ($_isfile(sys\spam.txt)) {
n335= if ($_cnfrm(Are you sure you want to delete the spam log?)) {
n336= remove sys\spam.txt
n337= close -@ @Spam
n338= }
n339= }
n340= }
n341= &Font...:font
n342= -
n343= &Close:savewinpos $active | close -@ $active
n344=}
n345=on *:close:@Spam.log:savewinpos $target
n346=alias -l update.lamechans {
n347= did -r lists 33
n348= if ($_readini(lame.ini,$1,channels)) did -a lists 33 $ifmatch
n349=}
n350=alias -l _qquit {
n351= if ($_cnfrm(Remove [ %.quit ] from the quit messages?)) {
n352= write -dl [ $+ [ $did(lists,53).sel ] ] sys\quits.txt
n353= did -d lists 53 $did(lists,53).sel
n354= }
n355=}
n356=alias -l adninf return Filename: $crlf $nopath($1) $crlf $crlf Addon type: $crlf $_addon($1) $crlf $crlf Status: $crlf $iif($script($nopath($1)) || $alias($nopath($1)),Loaded,Not Loaded) $crlf $crlf Description: $crlf $_getdesc($1)
n357=alias -l lq {
n358= if (($1 == -a) && ($_cnfrm( [ $nopath($2) ] is not an alias file, would you like to load it anyway?))) {
n359= .load -a $2
n360= did -b lists 4,5
n361= }
n362= if (($1 == -s) && ($_cnfrm( [ $nopath($2) ] is not a remote file, would you like to load it anyway?))) {
n363= .unload -rs $script(basic.ini)
n364= .load -rs $2
n365= .load -rs sys\basic.ini
n366= did -b lists 4,5
n367= }
n368=}
n369=alias -l adl {
n370= var %d = $mircdir $+ addon\
n371= var %m = $findfile(%d,*.mrc,0,did -a lists 6 $nopath($1-)), %i = $findfile(%d,*.ini,0,did -a lists 6 $nopath($1-))
n372=}
n373=alias _addon {
n374= if (($addoncheck(script,$1)) && ($addoncheck(aliases,$1))) return Alias or Remote
n375= if ($addoncheck(script,$1)) return Remote
n376= if ($addoncheck(aliases,$1)) return Alias
n377= return Unknown
n378=}
n379=alias addoncheck {
n380= if ($exists($2-) == $false) return
n381= var %_filetype = $gettok($2-,-1,46)
n382= if (%_filetype == ini) return $initopic($2-,$1)
n383= var %_tmp.read.1 = $read -nson $2-, %_tmp.read.2 = $read -nsalias $2-, %_tmp.read.3 = $read -nsmenu $2-, %_tmp.read.4 = $read -nsraw $2-
n384= if ($1 == script) {
n385= if (%_tmp.read.2) return 1
n386= if ((%_tmp.read.1) && (%_tmp.read.1 != $chr(123))) return 1
n387= if ((%_tmp.read.3) && (%_tmp.read.3 != $chr(123))) return 1
n388= if ((%_tmp.read.4) && (%_tmp.read.4 != $chr(123))) return 1
n389= }
n390= if ((%_tmp.read.1) && (%_tmp.read.1 == $chr(123))) return 1
n391= if (%_tmp.read.2) return 0
n392=}
n393=alias -l sendlog {
n394= %.txt = DCC Send $nopath($1-) to whom?
n395= if ($inputbox(%.txt)) dcc send $ifmatch $1-
n396=}
n397=alias -l listlogs {
n398= did -b lists 12
n399= var %x = $findfile($logdir,*.log,0,did -a lists 14 $nopath($1-))
n400=}
n401=alias -l remlog {
n402= var %ask = Are you sure you want to delete $iif(($did(lists,14,0).sel == 1),$did(lists,14,$did(lists,14,1).sel),the selected files) $+ ?
n403= if ($_cnfrm(%ask)) {
n404= while ($did(lists,14,$did(lists,14,1).sel)) {
n405= .remove $logdir $+ $ifmatch
n406= did -d lists 14 $did(lists,14,1).sel
n407= }
n408= did -o lists 13 1 Select a logfile to view:
n409= }
n410= dialog -v lists
n411=}
n412=; /ajoin network channel password
n413=alias ajoin {
n414= if (($1 == on) || ($1 == off)) toggle main autojoin Autojoin
n415= elseif ($2) {
n416= var %.network = $iif($istok(EFNet Undernet DALNet IRCNet Unknown,$1,32),$1,Unknown)
n417= var %temp.auto = $i(autochans,%.network)
n418= _set autochans %.network $addtok(%temp.auto,$2,44)
n419= if ($len($3)) _set autochanpwds. [ $+ [ %.network ] ] $2 $3
n420= flushini sys\main.ini
n421= if ($dialog(lists)) did -a lists 19 $did(lists,18)
n422= if ($show) iecho Updated autojoin list for %.network $+ : $i(autochans,%.network)
n423= }
n424= else bhelp ajoin
n425=}
n426=; /rjoin channel [network]
n427=alias rjoin {
n428= if ($1) {
n429= var %.network = $iif($2,$2,Unknown)
n430= var %temp.auto = $i(autochans,%.network)
n431= if ($istok(%temp.auto,$1,44)) {
n432= if ($sub($gettok(%temp.auto,0,44),1)) {
n433= _set autochans %.network $remtok(%temp.auto,$1,44)
n434= _unset autochanpwds. [ $+ [ %.network ] ] $1
n435= }
n436= else {
n437= _unset autochans %.network
n438= _unset autochanpwds. [ $+ [ %.network ] ]
n439= }
n440= flushini sys\main.ini
n441= if ($show) iecho Updated autojoin list for %.network $+ : $i(autochans,%.network)
n442= }
n443= else if ($show) iecho $1 is not in the autojoin list.
n444=
n445= }
n446= else bhelp rjoin
n447=}
n448=alias _ajoin_refresh {
n449= if ($dialog(lists) == $null) return
n450= did -r lists 19
n451= if ($1) var %.anet = $_rn1($1)
n452= elseif ($i(main,last.ajoin)) var %.anet = $_rn1($ifmatch)
n453= else var %.anet = EFNet
n454= _set main last.ajoin $_rn1(%.anet)
n455= did -c lists $_rn2(%.anet)
n456= var %i = 1
n457= while ($gettok($i(autochans,%.anet),%i,44)) {
n458= var %.achan = $ifmatch
n459= var %.apass = $i($bind(autochanpwds.,%.anet),%.achan)
n460= did -a lists 19 %.achan %.apass
n461= inc %i
n462= }
n463= if ($i(main,autojoin) == on) did -c lists 21
n464=}
n465=alias find if ($1-) set %.lostfile $1- | dialog -dm ffind ffind
n466=dialog ffind {
n467= size -3 -3 300 70
n468= title "Find"
n469= button "",1, 1 1 1 1, cancel hide
n470= text "Filename:", 2, 5 15 50 14
n471= text "Find in:", 3, 5 38 50 14
n472= combo 4, 55 10 160 200, drop edit autohs autovs
n473= edit "",5, 55 35 160 22, drop sort autovs
n474= button "&Find", 6, 220 8 75 22, default
n475= button "&Browse", 7, 220 33 75 22
n476= list 8, 5 90 290 117, sort hsbar vsbar
n477= text "Found:", 9, 5 70 300 14
n478= button "&Open selected", 10, 5 200 90 23
n479= button "Open &with...", 11, 105 200 90 23
n480= button "View in ¬epad",12, 205 200 90 23
n481= button "&Send to...", 13, 5 230 90 23, disable
n482= combo 14, 100 230 195 100, edit drop sort disable
n483=}
n484=on *:dialog:ffind:init:*:{
n485= if ((%.lostfile) && ($isrecf(%.lostfile) == $false)) addrecf %.lostfile
n486= var %x = 1, %o = $_recf
n487= while ($gettok(%o,%x,32)) {
n488= did -a $dname 4 $ifmatch
n489= if ($ifmatch == %.lostfile) did -c $dname 4 %x
n490= inc %x
n491= }
n492= did -a $dname 5 $left($mircdir,3)
n493= if ($server) did -e $dname 13,14
n494=}
n495=on *:dialog:ffind:sclick:1:unset %.lostfile
n496=on *:dialog:ffind:sclick:6:{
n497= var %.lostfile = $did(4)
n498= if (%.lostfile) {
n499= dialog -t $dname Find ... Please wait
n500= did -o $dname 9 1 Searching for %.lostfile ... please wait.
n501= if ($isrecf(%.lostfile) == $false) addrecf %.lostfile
n502= did -r $dname 8
n503= dialog -s $dname $cwin(300,260) 300 260
n504= var %tmp_path = $iif($did(5),$did(5),$left($mircdir,3))
n505= window -hl @find_it
n506= if ((* !isin %.lostfile) && (. !isin %.lostfile)) %.lostfile = * $+ %.lostfile $+ *
n507= var %.ffind = $findfile(%tmp_path,%.lostfile,@find_it)
n508= var %.ffind = $finddir(%tmp_path,%.lostfile,@find_it)
n509= if ($line(@find_it,0)) {
n510= filter -wo @find_it $dname 8 *
n511= did -o $dname 9 1 Found: $line(@find_it,0) file(s) - Double click to open.
n512= var %i = 0
n513= while ( [ $readini -n $_mircini dccnicks $bind(n,%i) ] ) {
n514= did -a $dname 14 $ifmatch
n515= inc %i
n516= }
n517= did -c $dname 14 1
n518= }
n519= else did -o $dname 9 1 Found: 0 files
n520= dialog -t $dname Find
n521= .timer 1 0 window -c @find_it $chr(124) did -z $dname 8
n522= }
n523=}
n524=on *:dialog:ffind:sclick:7:.timer 1 0 _fsdir
n525=on *:dialog:ffind:dclick:8:_ffind runfile
n526=on *:dialog:ffind:sclick:10:_ffind runfile
n527=on *:dialog:ffind:sclick:11:_ffind runfile2
n528=on *:dialog:ffind:sclick:12:_ffind runfile3
n529=on *:dialog:ffind:sclick:13:if (($did(ffind,8,$did(ffind,8).sel)) && ($did(14))) dcc send $did(14) " $+ $did(ffind,8,$did(ffind,8).sel) $+ "
n530=alias -l _ffind if ($did(ffind,8,$did(ffind,8).sel)) .timer 1 0 $1 $ifmatch | dialog -v ffind
n531=alias -l isrecf return $istok($_recf,$1,32)
n532=alias -l _recf return $i(recent,findfile)
n533=alias -l addrecf if ($len($_recf) < 900) _set recent findfile $addtok($_recf,$1-,32)
n534=alias -l runfile {
n535= if (((*.exe iswm $1-) || (*.com iswm $1-) || (*.bat iswm $1-)) && ($_cnfrm($rmsg($1-)) == $false)) { dialog -v ffind | halt }
n536= var %f = " $+ $1- $+ ", %t = $gettok($1-,-1,46)
n537= if ($ismedia($1-)) splay %f
n538= elseif ($istok(jpg.jpeg.bmp.tif.gif,%t,46)) view %f
n539= else run %f
n540=}
n541=alias -l runfile2 if ($_isfile($1-)) { var %.2view = $ifmatch | var %.sel.exe = $dir="Select an application to open $nopath($remove(%.2view,")) " \*.exe | if ($_isfile(%.sel.exe)) run $ifmatch %.2view } | dialog -v ffind
n542=alias -l runfile3 if ($_isfile($1-)) notepad $ifmatch
n543=alias -l rmsg return WARNING: $crlf This is a $_ext($1-) file. Running this could be dangerous! Are you sure you want to run this?
n544=alias -l _ext return . $+ $upper($gettok($1-,-1,46))
n545=alias _fsdir var %.fd = $sdir="Select starting directory" | if (%.fd) did -o ffind 5 1 $ifmatch | dialog -v ffind
n546=on *:start:_unset recent findfile
n547=dialog spop {
n548= title "Servers"
n549= size -1 -1 565 270
n550= button "&OK", 1, 165 230 75 25, ok
n551= list 2, 10 30 230 200, vsbar extsel
n552= list 3, 325 30 230 200, vsbar
n553= text "From servers.ini:", 4, 10 15 100 14
n554= text "Current list:", 5, 320 15 100 14
n555= button "&Add >>",6, 245 90 75 22
n556= button "<< &Remove",7, 245 120 75 22
n557= button "&Cancel",8, 245 230 75 25, cancel
n558= button "&Help",9, 325 230 75 25
n559=}
n560=on *:DIALOG:spop:init:*:.timer 1 0 _lservers
n561=on *:DIALOG:spop:sclick:6:{
n562= if ($did(3).lines >= 30) { s.err Server list is full. Unable to add more. | halt }
n563= if (($did(2,0).sel > 30) || ($calc($did(3).lines + $did(2,$did(2,0).sel)) > 30)) { s.err Too many servers selected. | halt }
n564= var %x = 1
n565= while ($did(2,$did(2,%x).sel)) {
n566= did -a spop 3 $ifmatch
n567= inc %x
n568= }
n569=}
n570=on *:DIALOG:spop:sclick:7:if ($did(3,1).sel) did -d spop 3 $did(3,1).sel
n571=on *:DIALOG:spop:sclick:9:help Server_List
n572=on *:DIALOG:spop:sclick:1:{
n573= _unset servers
n574= var %x = 1
n575= while (%x <= 30) {
n576= if ($did(3,%x)) _set servers %x $ifmatch
n577= inc %x
n578= }
n579=}
n580=; /_progress <text>
n581=alias _progress {
n582= if ($window(@Progress) == $null) { window -dohkp +fL @Progress $mwin(300,55) 300 55 | window -ar @Progress }
n583= %_progress.text = $1- ... 0%
n584= drawrect -nrf @Progress $rgb(face) 1 0 0 300 55
n585= drawtext -nr @Progress $rgb(text) "MS Sans Serif" 14 10 10 %_progress.text
n586= drawrect -nf @Progress 0 1 10 33 272 3
n587= drawrect -n @Progress 1 1 10 33 273 4
n588= drawdot @Progress
n589=}
n590=; /_progress² <current> <total>
n591=alias _progress² {
n592= if ($window(@Progress) == $null) { _prog.end | return }
n593= var %x = $calc($width(%_progress.text,MS Sans Serif,14,0,1) - 3)
n594= drawrect -nrf @Progress $rgb(face) 1 %x 10 300 15
n595= drawtext -r @Progress $rgb(text) "MS Sans Serif" 14 %x 10 $_perc($1,$2)
n596= drawrect -f @Progress 2 1 11 34 $calc(271 * ($remove($_perc($1,$2),%) / 100)) 2
n597= if (($calc(270 * ($remove($_perc($1,$2),%) / 100)) == 270) || ($1 >= $2)) .timer³ -m 1 500 _prog.end
n598=}
n599=alias -l _prog.end window -c @Progress | unset %_progress.text
n600=alias _perc return $int($remove($percent($1,$2),%)) $+ %
n601=; /mdid² switch dname begin end
n602=alias mdid² {
n603= var %.d = $3, %ids
n604= while (%.d <= $4) {
n605= %ids = $addtok(%ids,%.d,44)
n606= inc %.d
n607= }
n608= if (%ids) did $1-2 %ids
n609=}
n610=alias insert.x {
n611= %line = 2
n612= while ($line($1,%line)) {
n613= %ifold = $ifmatch
n614= %ifmatch = $gettok($remove(%ifold,$chr(9)),1,32)
n615= if (%ifmatch == $gettok($remove($line($1,$sub(%line,1)),$chr(9)),1,32)) {
n616= inc %line
n617= continue
n618= }
n619= elseif ($line($1,$add(%line,1))) iline -c [ $+ [ $colour(listbox) ] ] $1 %line %ifold
n620= inc %line
n621= }
n622= unset %line %ifold %ifmatch
n623=}
n624=;EOF
[aliases]
n0=; /abot <-c|-j> <server|#channels> <botnick> <hostmask> <command>
n1=; -c means trigger command on connect
n2=; -j trigger command upon joining a channel
n3=abot {
n4= if ($1 == -c) { %.botevnt = $1 | %.botserv = $2 | %.botnick = $3 | %.botmask = $4 | %.botcmnd = $5- | unset %.botchan }
n5= elseif ($1 == -j) { %.botevnt = $1 | %.botchan = $2 | %.botnick = $3 | %.botmask = $4 | %.botcmnd = $5- | unset %.botserv }
n6= else { .timer 1 0 s.err Invalid switch. | halt }
n7= if (%.botcmnd == $null) { .timer 1 0 s.err No command given. | halt }
n8= var %num = 1, %inc = 1
n9= while ($_readini(botlist.ini,%num,nick)) { if ($ifmatch == %.botnick) { var %inc = 0 | break } | inc %num | continue }
n10= if (%inc == 1) { var %total = $_readini(botlist.ini,abot.count,total) | writeini -n sys\botlist.ini abot.count total $add(%total,1) }
n11= var %com = writeini -n sys\botlist.ini %num
n12= %com nick %.botnick
n13= %com mask %.botmask
n14= %com cmnd %.botcmnd
n15= %com evnt %.botevnt
n16= if (%.botchan) %com chan %.botchan
n17= if (%.botserv) %com serv %.botserv
n18= writeini sys\botlist.ini Bot.List $fixnick(%.botnick) %.botmask
n19= if ($show) iecho %.botnick ( $+ %.botmask $+ ) added to autobot list.
n20= if ($dialog(userlist)) {
n21= set %abot.ul.mask. $+ %.botnick %.botmask
n22= set %abot.ul.cmnd. $+ %.botnick %.botcmnd
n23= set %abot.ul.evnt. $+ %.botnick %.botevnt
n24= set %abot.ul.chan. $+ %.botnick %.botchan
n25= set %abot.ul.serv. $+ %.botnick %.botserv
n26= did -r userlist 73,72,67,68
n27= did -u userlist 70,71
n28= if ($didwm(userlist,62,%.botnick) == 0) did -a userlist 62 %.botnick
n29= did -u userlist 62
n30= }
n31=}
n32=; /rbot botnick
n33=rbot {
n34= var %i = 1
n35= while (%i <= $_readini(botlist.ini,abot.count,total)) {
n36= if ($_readini(botlist.ini,%i,nick) == $$1) {
n37= remini sys\botlist.ini %i
n38= inc %i
n39= while ($_readini(botlist.ini,%i,nick)) {
n40= var %com = writeini -n sys\botlist.ini $sub(%i,1)
n41= %com nick $_readini(botlist.ini,%i,nick)
n42= %com mask $_readini(botlist.ini,%i,mask)
n43= %com cmnd $_readini(botlist.ini,%i,cmnd)
n44= %com evnt $_readini(botlist.ini,%i,evnt)
n45= if ($_readini(botlist.ini,%i,chan)) %com chan $ifmatch
n46= if ($_readini(botlist.ini,%i,serv)) %com serv $ifmatch
n47= remini sys\botlist.ini %i
n48= inc %i
n49= }
n50= remini sys\botlist.ini Bot.List $fixnick($$1)
n51= if ($show) iecho $$1 has been removed from the botlist.
n52= if ($dialog(userlist)) rbot.cleardialog $1
n53= writeini -n sys\botlist.ini abot.count total $sub($_readini(botlist.ini,abot.count,total),1)
n54= halt
n55= }
n56= inc %i
n57= }
n58= $iif($show,iecho,s.err) $$1 does not seem to be in the botlist.
n59=}
n60=rbot.cleardialog {
n61= did -u userlist 70,71
n62= did -r userlist 67,68,72,73
n63= if ($didwm(userlist,62,$1)) did -d userlist 62 $ifmatch
n64= did -u userlist 62
n65= unset %abot.ul.*. [ $+ [ $1 ] ]
n66=}
n67=addbot {
n68= if ($3 == $null) { iecho Usage: /ADDBOT <botnick> <channel> <password> [hostmask] | return }
n69= %addbot = $iif($show,1,0)
n70= %temp.botpass = $3
n71= %temp.botchan = $iif(($2 == *) || ($left($2,1) isin &#),$2,$rechan($2))
n72= %temp.botnick = $1
n73= if ($4) %temp.botmask = $4
n74= elseif ($address($1,3)) %temp.botmask = $ifmatch
n75= elseif ($server) { %temp.botnick = $1 | .enable #userlist | .raw USERHOST %temp.botnick | halt }
n76= else %temp.botmask = $1 $+ !*@*
n77= _addbot %temp.botnick %temp.botchan %temp.botmask %temp.botpass
n78=}
n79=addbot² {
n80= set %_temppass $inputbox(Enter password"Add bot)
n81= set %_tempchan $inputbox(Enter channels"Add bot)
n82= if ((%_temppass == $null) || (%_tempchan == $null)) return
n83= addbot $1 %_tempchan %_temppass $2-
n84=}
n85=addbot³ userlist +ab $1-
n86=exe.slot { var %x = 0 | while (%x <= 9) { if ($i(external_programs,$bind(n,%x)) == $null) return %x | inc %x } | return }
n87=addexe {
n88= :top | var %slot = $exe.slot | if (%slot == $null) { iecho Slots full. Unable to add more programs. | halt }
n89= %exe.num = $bind(n,%slot) | %program.tmp = $$dir="Select program (.exe file) to add to menubar popup" \*.exe
n90= %.tmp.prog = $gettok($nopath(%program.tmp),1,46) | %.tmp.ptxt = Enter program description, or leave empty to use %.tmp.prog (description will appear in the menubar) $crlf
n91= if ($inputbox(%.tmp.ptxt)) %program.desc = $ifmatch | else unset %program.desc
n92= %program.tmp = %program.tmp $+ ; $+ $iif(%program.desc != $null,%program.desc,%.tmp.prog)
n93= _set external_programs %exe.num %program.tmp | %prog.tmp.all = %prog.tmp.all $gettok(%program.tmp,2-,59)
n94= if (($exe.slot) && ($_cnfrm(Add another program?))) goto top | iecho Added to menubar: %prog.tmp.all | unset %prog.tmp.all %program.tmp
n95=}
n96=addlame if ($len($1)) _add2list -n $1- | else if ($show) bhelp addlame
n97=addon _set main last.list 1 Addon Manager | lists
n98=addserver {
n99= var %x = 0
n100= :loop
n101= inc %x
n102= if (%x <= 30) {
n103= if ($i(servers,%x)) goto loop
n104= _set servers %x $1
n105= if ($show) iecho Added $1 to servers list.
n106= }
n107= else if ($show) iecho Servers list is full. Unable to add more.
n108=}
n109=addword if ($left($1,1) != $null) _add2list -w $1- | else if ($show) bhelp addword
n110=autobot {
n111= if ($1 == $null) bhelp autobot
n112= else {
n113= if (($1 == on) || ($1 == off)) _set main autobot $1
n114= if ($show) iecho Auto opping from bots is now: $upper($i(main,autobot))
n115= }
n116=}
n117=dcc_hist {
n118= var %w @DCC History, %winstat = $mwin(400,200) 400 200
n119= if ($window(%w) == $null) window -kl -t6,15,25,35,50,60 %w $winpos(%w,%winstat) %w $winfont(%w)
n120= .timerDCCs off
n121= clear %w
n122= aline %w Type $chr(9) Date $chr(9) Nick $chr(9) Size $chr(9) Filename
n123= aline %w $x
n124= var %.f = $_isfile($_dcclog)
n125= if (%.f) {
n126= filter -fw %.f %w Rcvd*
n127= aline %w $x
n128= filter -fw %.f %w Sent*
n129= }
n130= window -b %w
n131=}
n132=wholeft {
n133= var %nfile = $__var(netsplitfile.,$server)
n134= if ($isfile(%nfile) == $false) { iecho The splitlist has been cleared. | halt }
n135= if ($format(split_head)) $ifmatch
n136= else {
n137= var %cmd = echo $iif(@* iswm $active,-st,-at)
n138= %cmd $+ $c1 $+ Ú $+ $str(Ä,17) $+ Â $+ $str(Ä,47) $+ ¿
n139= %cmd $+ $c1 $+ ³ $align(15,Nick) $+ $c1 $+ ³ $align(45,Address) $+ $c1 $+ ³
n140= %cmd $+ $c1 $+ Ã $+ $str(Ä,17) $+ Å $+ $str(Ä,36) $+ - $+ $c3 $+ -- $+ $c4 -- $+ $c1 $+ ÄÄ $+ $c2 $+ Ä - $+ $c1 $+ ´
n141= }
n142= var %c = $iif($len($colour(text)) < 2,$bind(0,$colour(text)),$colour(text)), %i = 1, %total = $lines(%nfile)
n143= while (%i <= %total) {
n144= var %.sread = $read -nl %i %nfile
n145= if (%.sread) {
n146= %.snick = $gettok(%.sread,1,32)
n147= %.shost = $gettok(%.sread,2,32)
n148= %.sserv = $gettok(%.sread,3,32)
n149= if ($format(split_mid,%.snick,%.shost,%.sserv)) $ifmatch
n150= else %cmd $+ $c1 $+ ³ $+ $c3 $align(15,%.snick) $+ $c1 $+ ³ $+ %c $+ $_align(10,$gettok(%.shost,1,64)) $+ $+ $c4 $+ @ $+ %c $+ $align(34,$gettok(%.shost,2,64)) $+ $c1 $+ ³
n151= }
n152= inc %i
n153= }
n154= if ($format(split_foot)) $ifmatch
n155= else %cmd $+ $c1 $+ À $+ $+ $+ $c3 $+ -- $+ $c4 -- $+ $c1 $+ ÄÄ $+ $c2 $+ Ä - $+ $c1 $+ $str(Ä,6) $+ -Á $+ $str(Ä,34) $+ -( $+ $c3 Netsplit $+ $c1 $+ ) $+ Ù
n156=}
n157=joinall {
n158= unset %chan.list %.ap
n159= var %.network = $gettok($_network,1,32)
n160= var %.all = $i(autochans,%.network), %i = 1
n161= while ($gettok(%.all,%i,44)) {
n162= var %.ac = $ifmatch
n163= var %.ak = $i($bind(autochanpwds.,%.network),%.ac)
n164= if (%.ak) join %.ac %.ak
n165= else %chan.list = $addtok(%chan.list,%.ac,44)
n166= inc %i
n167= }
n168= if (%chan.list) join $ifmatch
n169=}
n170=ig {
n171= set %_inick $1
n172= if ($1 == $null) {
n173= if ($query($active) == $null) return
n174= if ($query($active) == $active) set %_inick $active
n175= }
n176= if (%_inick == $null) return
n177= set %_itype $iif($2 isnum 0-9,$2,$i(ctcps,ignore_type))
n178= set %_itime -u $+ $iif($3 isnum,$mult($3,60),$i(ctcps,ignore_time))
n179= if (*!*@* iswm %_inick) {
n180= ignore %_itime %_inick
n181= iecho Added %_inick to ignore list for $remove(%_itime,-u) seconds.
n182= return
n183= }
n184= if ($server) {
n185= ignore %_itime %_inick %_itype
n186= close -cfgms %_inick
n187= iecho Added %_inick to ignore list for $remove(%_itime,-u) seconds.
n188= }
n189=}
n190=msend multisend $1-
n191=multisend {
n192= if (-* iswm $1) { if (i isin $1) %msend.ip = 1 | if (d isin $1) %msend.delay = 1 | tokenize 32 $2- }
n193= %msend.nick = $$?1="Send multiple files to whom?"
n194= if ($2) { set %msend.file $2- | dcc send %msend.nick %msend.file }
n195= else {
n196= unset %msend.file
n197= :s
n198= %msend.tmp = $$dir="Select a file to send" *.*
n199= %msend.file = %msend.file $chr(124) " $+ %msend.tmp $+ "
n200= if ($_cnfrm(Add more files to send?)) goto s
n201= iecho Initiating multiple DCC send to %msend.nick ...
n202= if (%msend.ip) { send2ip %msend.nick %msend.file | unset %msend.ip | return }
n203= if (%msend.delay != 1) {
n204= dcc send %msend.nick $remove(%msend.file,$chr(124))
n205= unset %msend.delay
n206= }
n207= else multisend² %msend.nick %msend.file
n208= }
n209=}
n210=multisend² {
n211= var %d = 1
n212= while ($gettok($2-,%d,124)) {
n213= .timer.mSend $+ $$1 1 6 dcc send $1 $ifmatch
n214= inc %d
n215= }
n216=}
n217=notify {
n218= if (($1 == $null) || ($1 == -s) || ($1 == -h)) { if ($server) notify $1- | else iecho Not connected to server }
n219= elseif (($1 == on) || ($1 == off)) { .notify $1 | if ($show) iecho Notify is $upper($1) }
n220= elseif ($1 == -r) { if ($2 == $null) iecho Notify: insufficient parameters | elseif ($2 isnotify) { .notify -r $2 | if ($wildtok(%notify,$2!*,1,32)) %notify = $remtok(%notify,$ifmatch,32) | if ($show) iecho $2 has been removed from the notification list. } | else if ($show) iecho $2 is not in the notify list. }
n221= else { if ($1 isnotify) { if ($show) iecho Notify: $1 is already in the list. } | else { .notify $1- | if ($show) iecho Added $1 to notify list. } }
n222=}
n223=remexe { if ($i(external_programs,$1)) { var %tmp = $ifmatch | _unset external_programs $1 | flushini sys\main.ini | .timer.remexe 1 0 .fixini external_programs sys\main.ini | iecho Removed from menubar: $gettok(%tmp,2,59) } }
n224=remword if ($left($1,1) == $null) { if ($show) bhelp remword } | else _remflist -w $1-
n225=timers {
n226= if ($1 == off) { .timers off | if ($show) iecho All timers halted. | return }
n227= if ($1) { timers $1- | return }
n228= if ($timer(0) == 0) { iecho No active timers. | return }
n229= var %t = 1
n230= while ($timer(%t)) {
n231= if (%t == 1) iecho $^k(Active timers:)
n232= if ($timer(%t).reps == 0) iecho Timer $timer(%t) $duration($timer(%t).delay) delay $timer(%t).com
n233= else iecho Timer $timer(%t) $timer(%t).reps time(s) $duration($timer(%t).delay) delay $timer(%t).com
n234= inc %t
n235= }
n236=}
n237=toggle {
n238= var %_t.ch = $i($1,$2), %tog.check
n239= _set $1 $2 $iif(%_t.ch != on,on,off)
n240= flushini sys\main.ini
n241= set %tog.check $i($1,$2)
n242= if ($show) iecho $3- is now $upper(%tog.check)
n243=}
n244=ulevel {
n245= var %i = 1, %nick
n246= while ($gettok($1-,%i,32)) {
n247= %nick = $ifmatch
n248= if ($banned($address(%nick,5))) iecho %nick is a shitlisted user!!
n249= elseif ($address(%nick,5)) iecho User level for %nick $+ $c1 $+ ( $+ $gettok($address(%nick,5),2-,33) $+ $+ $c1 $+ ): $level($_ulist($address(%nick,5)))
n250= else iecho Unable to get userlevel info for $1 (you're not in a channel or $1 is not in the channel)
n251= inc %i
n252= }
n253=}
n254=ulist {
n255= if ($1 isnum) {
n256= if ($ulist(*,$1,0)) {
n257= iecho Listing users with level $1
n258= var %u = 1
n259= while ($ulist(*,$1,%u)) { iecho $1 $+ : $+ $ifmatch | inc %u }
n260= iecho End of list.
n261= }
n262= else iecho There are no users for level $1
n263= }
n264= else userlist
n265=}
n266=unbot {
n267= if ($0 < 2) { iecho Need a channel to remove a bot | return }
n268= var %_allbots = $_readini(botlist.ini,botnicks,all)
n269= if ($istok(%_allbots,$1,32)) {
n270= var %_c = $_readini(botlist.ini,$1,channels)
n271= if (($2 == *) || ($2 == %_c)) {
n272= if ($sub($numtok(%_allbots,32),1)) writeini -n sys\botlist.ini botnicks all $remtok(%_allbots,$1,32)
n273= else remini sys\botlist.ini botnicks
n274= remini sys\botlist.ini $fixnick($1)
n275= var %totalbotremoval = 1
n276= }
n277= elseif ($istok(%_c,$2,32)) {
n278= writeini -n sys\botlist.ini $fixnick($1) channels $remtok(%_c,$2,32)
n279= var %totalbotremoval = 0
n280= }
n281= remini sys\botlist.ini Bot.List $fixnick($1)
n282= if ($show) {
n283= if (%totalbotremoval) iecho $1 has been removed from the botlist.
n284= else iecho Updated bot info for $1
n285= }
n286= if ($dialog(userlist)) {
n287= if ($didwm(userlist,51,$did(userlist,51))) did -d userlist 51 $ifmatch
n288= did -r userlist 57,58,59
n289= did -u userlist 51
n290= }
n291= }
n292=}
n293=unig .ignore -r $1-
n294=unlame {
n295= if ($left($1,1) == $null) { if ($show) bhelp unlame }
n296= else {
n297= _remflist -n $1-
n298= if ($dialog(lists)) {
n299= var %di = 1
n300= while ($did(lists,31,%di)) {
n301= if ($ifmatch == $1) {
n302= did -d lists 31 %di
n303= break
n304= }
n305= inc %di
n306= }
n307= did -u lists 31 0
n308= did -r lists 33
n309= }
n310= }
n311=}
n312=unserv {
n313= var %x = 0
n314= :loop
n315= inc %x
n316= if (%x <= 30) {
n317= if ($i(servers,%x) != $1) goto loop
n318= _unset servers %x
n319= var %x = 1
n320= window -lh @slw
n321= while ($i(servers,%x)) {
n322= aline @slw $ifmatch
n323= inc %x
n324= }
n325= var %x = 1
n326= while ($line(@slw,%x)) {
n327= _set servers %x $ifmatch
n328= inc %x
n329= }
n330= close -@ @slw
n331= if ($show) iecho Removed $1 from servers list.
n332= }
n333= else if ($show) iecho Unable to find $1 in the custom servers list.
n334=}
n335=whereis {
n336= if ($0 == 0) { iecho Usage: /whereis $cs(<alias>) | return }
n337= var %i = 1
n338= while ($gettok($1-,%i,32)) {
n339= var %whereis = $ifmatch
n340= if ($isalias(%whereis)) iecho %whereis $+ : $isalias(%whereis).fname
n341= else iecho %whereis $+ : No such alias
n342= inc %i
n343= }
n344=}
n345=;/_add2list -n|w nick|word channel1,channel2,channel3..
n346=_add2list {
n347= var %_add2file = $iif($1 == -n,lame.ini,words.ini)
n348= var %_add2name = sys\ $+ %_add2file
n349= var %_add2head = $iif(lame isin %_add2file,lamenicks,words)
n350= var %_add2list = $_readini(%_add2file,%_add2head,n0)
n351= var %_add2oldc = $_readini(%_add2file,$2,channels), %_add2newc = $iif((($3 == $null) || ($3 == *) || ($left($3,1) isin &#)),$3,$rechan($replace($3-,$chr(32),$chr(44))))
n352= if (%_add2newc == *) writeini %_add2name $2 channels *
n353= elseif (%_add2oldc == *) writeini %_add2name $2 channels %_add2newc
n354= else {
n355= %_add2var = 1
n356= while ($gettok(%_add2newc,%_add2var,44)) {
n357= %_add2temp = $ifmatch
n358= if ($istok(%_add2oldc,%_add2temp,44)) set %_add2newc $remtok(%_add2newc,%_add2temp,44)
n359= inc %_add2var
n360= }
n361= if (%_add2newc) writeini -n %_add2name $fixnick($2) channels $addtok(%_add2oldc,%_add2newc,44)
n362= }
n363= writeini -n %_add2name %_add2head n0 $addtok(%_add2list,$2,32)
n364= if ($show) {
n365= var %_add2info = $iif($1 == -n,nicks,words)
n366= iecho $2 has been added to the banned %_add2info in channels: $_readini(%_add2file,$2,channels)
n367= }
n368=}
n369=; /_addbot nick channel address password
n370=_addbot {
n371= var %^w = writeini -n sys\botlist.ini $fixnick($1)
n372= writeini -n sys\botlist.ini botnicks all $addtok($_readini(botlist.ini,Botnicks,all),$1,32)
n373= %^w hostmask $3
n374= %^w password $4
n375= %^w channels $replace($2,$chr(44),$chr(32))
n376= writeini -n sys\botlist.ini Bot.List $fixnick($1) $3
n377= if (%addbot) iecho Added to bot nicks $1 ( $+ $3 $+ ) in channels: $2 with password: $4
n378=}
n379=_autobotcheck {
n380= if ($i(main,autobot) != on) return
n381= var %botnicks = $_readini(botlist.ini,Botnicks,All), %i = 1
n382= while ($gettok(%botnicks,%i,32)) {
n383= var %bot = $ifmatch
n384= if (%bot isop $1) {
n385= var %chan = $_readini(botlist.ini,$fixnick(%bot),channels)
n386= if (($1 == %chan) || (%chan == *) || ($istok(%chan,$1,32))) {
n387= %autobotpass. [ $+ [ %bot ] ] = $_readini(botlist.ini,$fixnick(%bot),password)
n388= %autobotchan. [ $+ [ %bot ] ] = $1
n389= userhost %bot
n390= }
n391= }
n392= inc %i
n393= }
n394=}
n395=;/_editlist -n|w nick|word channel1,channel2,channel3..
n396=_editlist if ($iif($1 == -n,sys\lame.ini,$iif($1== -w,sys\words.ini))) writeini -n $ifmatch $2 channels $3-
n397=_gethost {
n398= if ((%on.connect == TRUE) && ($remove($gettok($1-,1,61),*) == $me)) {
n399= writeini $_mircini about fulladdress $replace($remove($1-,*),=+,!,=-,!)
n400= unset %on.connect | halt
n401= }
n402=}
n403=_isprot return $iif(($level($_ulist($address($1,5))) >= 40),$true,$false)
n404=_lservers {
n405= _progress Generating servers list
n406= var %f = $readini -n $_mircini files servers
n407= var %i = 0, %l = $calc(($lines(%f) - 1) + 30)
n408= while ($readini -n %f servers n $+ [ %i ]) {
n409= var %t = $ifmatch
n410= if ($wildtok($wildtok(%t,*SERVER:*,1,32),*.*,2,58)) did -a spop 2 $ifmatch
n411= elseif ($wildtok($wildtok(%t,*SERVER:*,1,32),*.*,1,58)) did -a spop 2 $ifmatch
n412= _progress² %i %l
n413= inc %i
n414= }
n415= var %x = 1
n416= while (%x <= 30) {
n417= if ($i(servers,%x)) did -a spop 3 $ifmatch
n418= _progress² $calc(%x + %i) %l
n419= inc %x
n420= }
n421= _progress² %l %l
n422=}
n423=_namegrab if ($__var(filename.,$1) == $null) set $_var(filename.,$1) n $+ $ticks $+ .$$$ | if ($2) write $__var(filename.,$1) $replace($2-,$chr(32),$lf)
n424=_ondisc {
n425= titlebar [Last server: $server $+ : $+ $port $+ ]]
n426= _set main lastserver $server $port
n427= unset %notify %reject.* %§* %^netsplit.* unset %filename.* %kicked.user.* %flood.*
n428= removetmp
n429= .remove clone.tmp
n430= if ($i(main,permnick) isnotify) .notify -r $i(main,permnick)
n431= .disable #userlist
n432= .identd on
n433= .timers off
n434= .rlevel 60
n435= if (%ExitQuit) {
n436= unset %ExitQuit
n437= .timer 1 0 exit
n438= }
n439=}
n440=;/_remflist -n|w nick|word
n441=_remflist {
n442= var %_remffile = sys\ $+ $iif($1 == -n,lame.ini,words.ini)
n443= var %_remfname = $remove(%_remffile,sys\), %_remfhead = $iif($1 == -n,lamenicks,words), %_remfinfo = $iif($1 == -n,nicks.,words.)
n444= var %_remflist = $_readini(%_remfname,%_remfhead,n0)
n445= if ($left(%_remflist,1) == $null) { if ($show) iecho There are no banned %_remfinfo }
n446= elseif ($istok(%_remflist,$2,32)) { if ($sub($gettok(%_remflist,0,32),1)) writeini -n %_remffile %_remfhead n0 $remtok(%_remflist,$2,32) | else remini %_remffile %_remfhead | remini %_remffile $fixnick($2) | if ($show) iecho $2 has been removed from the banned %_remfinfo }
n447= else if ($show) iecho $2 is not in the banned %_remfinfo
n448=}
n449=;/_ChanToMenu +/- Channel/Num Password
n450=_ChanToMenu {
n451= if ($isid) return $__var(MenuChanPass.,$__var(MenuChanName.,$1))
n452= if ($1 == +) { var %a = 0 | while (%a <= 9) { if ($__var(MenuChanName.,%a)) inc %a | else break } | if (%a > 9) { iecho Channels list is already full. Unable to add. | halt } | set $_var(MenuChanName.,%a) $2 | if ($3) set $_var(MenuChanPass.,$2) $3 | iecho $2 has been added to the channels list. }
n453= elseif ($1 == -) { if ($2 !isnum 0-9) return | var %Temp = $__var(MenuChanName.,$2) | if (%Temp) { unset $_var(MenuChanPass.,%Temp) $_var(MenuChanName.,$2) | if ($__var(MenuChanName.,$add($2,1))) { var %b = $add($2,1) | while (%b < 9) { if ($__var(MenuChanName.,%b)) { set $_var(MenuChanName.,$sub(%b,1)) $ifmatch | var %LastNum = %b } | inc %b } | unset %MenuChanName. [ $+ [ %LastNum ] ] } | iecho %Temp has been removed from the channels list. } }
n454=}
n455=; $_rc(text)
n456=; replaces @Ú @æ @ß @Ç with ^u ^r ^b and ^k respectively
n457=; used for writing to ini's for values with control codes
n458=_rc return $iif((( isin $1-) || ( isin $1-) || ( isin $1-) || ( isin $1-)),$replace($1-,,@Ú,,@æ,,@ß,,Ç),$replace($1-,@Ú,,@æ,,@ß,,Ç,))
n459=;eof