Basic — File Browser
Basicv09272000 / Basicv09272000 / SYS / misc.ini
misc.ini — 51.34 KB — Download this file
[aliases]
n0=aidle .timer.anti.idle 0 30 .quote PRIVMSG $!me :ANTI-IDLE
n1=ascii var %i = 1, %a, %len = $len($1-) | while (%i <= %len) { var %a = %a $align(3,$replace($mid($1-,%i,1),$chr(32),)) $+ $c1 $+ ( $+ $_align(4,$asc($mid($1-,%i,1))) $+ $+ $c1 $+ ) | if (4 // %i) { echo -a %a | var %a } | inc %i } | if (%a) echo -a %a
n2=basic_exit var %text = Close all instances of Basic? $crlf $iif($1 == -all,[Including this one]) | if ($_cnfrm(%text)) _bexit $1
n3=_bexit {
n4= var %mb = 1
n5= while ($isdde($bind(mIRCbasic,%mb))) {
n6= if ($bind(mIRCbasic,%mb) != $ddename) .dde $ifmatch command "" /exit
n7= inc %mb
n8= }
n9= if ($1 == -all) exit
n10=}
n11=checkdccs if ($window(@DCCÂ Status) == $null) { unset %dcc.* | .timerDCC off } | else dccstats
n12=dccstats {
n13= var %w = @DCCÂ Status
n14= if ($dccs == 0) { if ($window(%w) == $null) iecho No active DCC's | return }
n15= if (($i(display,dcc) == echo) && (%TempDCCStats != $true) && ($window(%w) == $null)) { dccecho | halt }
n16= var %winstat = $mwin(400,200) 400 200
n17= if ($window(%w) == $null) {
n18= window -kl -t6,15,25,35,50,60,70 +ftns %w $winpos(%w,%winstat) %w $winfont(%w)
n19= clear %w
n20= aline %w Type $chr(9) Nick $chr(9) Status $chr(9) Size $chr(9) Name $chr(9) Sent/Rcvd $chr(9) Speed $chr(9) Time Left
n21= }
n22= else dline %w 2-
n23= aline -c $+ $colour(back) %w -
n24= %dcc.total = $dccs
n25= %x = 1
n26= while ($chat(%x)) {
n27= aline %w CHAT $chr(9) $chat(%x) $chr(9) $chat(%x).status $chr(9) -- $chr(9) -- $chr(9) -- $chr(9) -- $chr(9) --
n28= inc %x
n29= }
n30= %x = 1
n31= while ($send(%x)) {
n32= var %stmp = $chr(9) $eta($send(%x).size,$send(%x).sent,$send(%x).cps)
n33= aline %w SEND $chr(9) $send(%x) $chr(9) $send(%x).status $chr(9) $_bytes($send(%x).size) $chr(9) $send(%x).file $chr(9) $send(%x).pc $+ [ $chr(37) ] $chr(9) $cps2kb($send(%x).cps) %stmp
n34= inc %x
n35= }
n36= %x = 1
n37= while ($get(%x)) {
n38= var %gtmp = $chr(9) $eta($get(%x).size,$get(%x).rcvd,$get(%x).cps)
n39= aline %w GET $chr(9) $get(%x) $chr(9) $get(%x).status $chr(9) $_bytes($get(%x).size) $chr(9) $get(%x).file $chr(9) $get(%x).pc $+ [ $chr(37) ] $chr(9) $cps2kb($get(%x).cps) %gtmp
n40= inc %x
n41= }
n42= %x = 1
n43= while ($fserv(%x)) {
n44= aline %w FSERV $chr(9) $fserv(%x) $chr(9) $fserv(%x).status $chr(9) -- $chr(9) -- $chr(9) -- $chr(9) -- $chr(9) --
n45= inc %x
n46= }
n47= .timerDCC 1 5 checkdccs
n48=}
n49=; /import -n|-u|-b filename
n50=import {
n51= if ($1 == -n) {
n52= set %.importfile $$dir="Select mirc.ini to import notify settings from" *.ini
n53= if ($nopath(%.importfile) != mirc.ini) { s.err You must select mirc.ini | halt }
n54= if (%.importfile == $mircini) { s.err Same mirc.ini selected. | halt }
n55= window -hl @_notify
n56= loadbuf -tnotify @_notify " $+ %.importfile $+ "
n57= var %t = $line(@_notify,0), %i = 1
n58= while ($line(@_notify,%i)) {
n59= .notify $gettok($ifmatch,2,61)
n60= inc %i
n61= }
n62= close -@ @_notify
n63= iecho Notify list updated
n64= }
n65= elseif ($1 == -u) {
n66= set %.importfile $$dir="Select remote.ini to import userlist from" *.ini
n67= if ($nopath(%.importfile) != remote.ini) { s.err You must select remote.ini | halt }
n68= var %.tmp = $mircdir $+ sys\remote.ini
n69= if (%.importfile == %.tmp) { s.err Same file selected. | halt }
n70= var %.import.ulist = $nofile(%.importfile) $+ userlist.ini
n71= var %.import.ulist = $shortfn(%.import.ulist)
n72= import.users %.importfile $+ $chr(124) $+ %.import.ulist
n73= }
n74= elseif ($1 == -b) {
n75= set %.importfile $$dir="Select main.ini to import" *.ini
n76= if ($nopath(%.importfile) != main.ini) { s.err You must select main.ini | halt }
n77= var %.tmp = $mircdir $+ sys\main.ini
n78= if (%.importfile == %.tmp) { s.err Same file selected. | halt }
n79= .copy -o " $+ %.importfile $+ " sys\main.ini
n80= iecho Script settings updated
n81= }
n82= elseif ($1 == -a) {
n83= set %.importfile $$dir="Select botlist.ini to import" *.ini
n84= if ($nopath(%.importfile) != botlist.ini) { s.err You must select botlist.ini | halt }
n85= var %.tmp = $mircdir $+ sys\botlist.ini
n86= if (%.importfile == %.tmp) { s.err Same file selected. | halt }
n87= .copy -a " $+ %.importfile $+ " sys\botlist.ini
n88= iecho Eggdrop bot list updated
n89= }
n90=}
n91=; /import.users importfile|secondfile
n92=import.users {
n93= var %file.1 = $gettok($1-,1,124), %file.2 = " $+ $gettok($1-,2-,144) $+ "
n94= var %check = $mircdir $+ sys\remote.ini
n95= var %same = $iif((%file.1 == %check),$true,$false), %ftmp = $nofile(%file.1) $+ idents.ini
n96= if ($_isfile(%ftmp)) { window -h @vcheck | filter -fw %ftmp @vcheck *=basic.ver* | if ($filtered) { var %l = $gettok($line(@vcheck,1),3,32) | if ((%l == 3.5) || (%l == $basic.ver)) { s.err You are attempting to import from almost the same version. Just move the remote.ini to your $mircdir $+ sys\ to import. | window -c @vcheck | halt } } | window -c @vcheck }
n97= window -hl @_users
n98= loadbuf -tusers @_users " $+ %file.1 $+ "
n99= var %i = 1, %t = $line(@_users,0)
n100= while ($line(@_users,%i)) {
n101= var %l = $ifmatch
n102= if ((%l) && (;* !iswm $gettok(%l,2,61))) {
n103= var %level = $gettok($gettok(%l,2,61),1,58), %host = $gettok($gettok(%l,2,61),2,58)
n104= if (%level == 40) {
n105= %.chan = $readini -n %file.2 ChanOps %host
n106= if (%.chan == $null) %.chan = *
n107= %.pass = $readini -n %file.2 Passwords %host
n108= if (%.pass == $null) %.pass = changeme
n109= if (%same) .ruser %host
n110= .adduser +ocsxuiv %host %.chan %.pass
n111= }
n112= elseif (%level == 30) {
n113= %.chan = $readini -n %file.2 Friends %host
n114= if (%.chan == $null) %.chan = *
n115= if (%same) .ruser %host
n116= .adduser +csxiv %host %.chan changeme
n117= }
n118= elseif (%level == 5) {
n119= %.chan = $readini -n %file.2 Shit %host
n120= if (%.chan == $null) %.chan = *
n121= %.why = $readini -n %file.2 Shitreasons %host
n122= if (%same) .ruser %host
n123= .addshit 3 %host %.chan %.why
n124= }
n125= }
n126= inc %i
n127= }
n128= close -@ @_users
n129= _ultag
n130= if ($show) iecho Userlist updated
n131=}
n132=_ultag {
n133= if ($isid) return $readini -n $_mircini about ulist_import
n134= writeini $_mircini about ulist_import TRUE
n135=}
n136=getwindir {
n137= write -c gwd.bat echo % $+ WINDIR% > windir.$$$
n138= write gwd.bat @echo off
n139= write gwd.bat cls
n140= run -n gwd.bat
n141= .timer 1 2 getwindir2
n142=}
n143=getwindir2 {
n144= _set main windir $read -nl1 windir.$$$
n145= .timer 1 2 .remove windir.$$$
n146= .remove gwd.bat
n147=}
n148=windir var %w = $i(main,windir) | if ($len($1)) return %w $+ $1 | return %w
n149=match {
n150= window -c @Scan
n151= set -u %.w $mwin(500,300) 500 300
n152= window -hlk -t10,50,30 @Scan $winpos(@Scan,%.w) @Scan $winfont(@Scan,Arial 11)
n153= aline @Scan Nick $chr(9) Address $chr(9) In Channels
n154= aline @Scan $x
n155= var %match.tmp = $1, %match.cmd = titlebar @Scan -
n156= if ($1 == -s) { var %match.tmp = $2, %match.cmd = msg $active | window -c @Scan }
n157= if ($1 == -e) { var %match.tmp = $2, %match.cmd = iecho | window -c @Scan }
n158= if (* !isin %match.tmp) var %match.tmp = * $+ %match.tmp $+ *
n159= iecho Searching for matches of %match.tmp
n160= var %match.found = $ial(%match.tmp,0), %match.w = 1
n161= %match.cmd Searching for %match.tmp
n162= while ($ial(%match.tmp,%match.w)) {
n163= var %match.tnick = $ial(%match.tmp,%match.w).nick
n164= if ($window(@Scan)) {
n165= setcomchans %match.tnick
n166= aline @Scan %match.tnick $chr(9) $ial(%match.tmp,%match.w).addr $chr(9) $_comchan($ial(%match.tmp,%match.w).nick)
n167= }
n168= else {
n169= var %match.tmp2 = $align(10,$mid(%match.tnick,1,9))
n170= if (msg isin %match.cmd) var %match.tmp2 = $replace(%match.tmp,ÿ, )
n171= var %match.t2 = $remove(%match.tmp,*)
n172= %match.cmd %match.tmp2 $+ $c1 $+ ( $+ $replace($ial(%match.tmp,%match.w).addr,%match.t2,%match.t2) $+ $+ $c1 $+ ) in $_comchan($ial(%match.tmp,%match.w).nick)
n173= }
n174= inc %match.w
n175= }
n176= if (%match.found == 0) {
n177= window -c @Scan
n178= if (msg* iswm %match.cmd) %match.cmd No matches found for %match.tmp
n179= else iecho No matches found for %match.tmp
n180= }
n181= else {
n182= %match.cmd Found %match.found match(es) for %match.tmp
n183= if ($window(@Scan)) window -warb @Scan
n184= }
n185=}
n186=rehash {
n187= if (($i(colors,n0) == $null) || ($numtok($i(colors,n0),44) < 5)) _set colors n0 10,04,16,11,14
n188= if ($i(colors,n1) == $null) _set colors n1 default
n189= if ($i(display,ascii) == $null) _set display ascii high
n190= _2 display font Terminal
n191= .display - $+ $left($i(display,ascii),1) $i(display,font)
n192= _remfonts
n193= if ($_pp(optn) == $null) _set personal optn 0,0,0,0,0,0
n194= if ($istok(Moderate.Strict.Lenient.Ignore all,$i(ctcps,adcc),46) == $false) _set ctcps adcc Moderate
n195= _2 awaysettings logging on
n196= _2 awaysettings pager on
n197= _2 awaysettings autoaway on
n198= _2 awaysettings automins 10
n199= _2 awaysettings autosecs 600
n200= _2 ctcps ignore_time 60
n201= _2 ctcps rejectkick off
n202= _2 ctcps rejectswitch off
n203= _2 ctcps outgoing active
n204= _2 ctcps incoming active
n205= _2 ctcps ctcp_abuse off
n206= _2 ctcps ignore_type 2
n207= _2 spam toggle off
n208= _2 sounds toggle off
n209= _ autobot off
n210= _ shownames on
n211= _ showsynch on
n212= _ showtopic on
n213= _ showstats on
n214= _ botnet_join on
n215= _ botnet_notice off
n216= _ botnet_nick on
n217= _ botnet_public off
n218= _ maxbotjoin 7
n219= _ maxbotnick 10
n220= _ maxbotnotice 10
n221= _ maxbotpublic 30
n222= _ maxrepeat 5
n223= _ maxctcp 5
n224= _ maxtext 8
n225= _ maxnick 4
n226= _ maxnotices 5
n227= _ maxjoins 9
n228= _ maxdeop 0
n229= _ maxkick 0
n230= _ maxban 0
n231= _ repeat_time 10
n232= _ ctcp_time 10
n233= _ text_time 10
n234= _ nick_time 10
n235= _ notices_time 10
n236= _ joins_time 10
n237= _ deop_time 15
n238= _ kick_time 0
n239= _ ban_time 0
n240= _ kickonban on
n241= _ longword off
n242= _ capskick on
n243= _ maxcaps 400
n244= _ clonejoin on
n245= _ maxclones 7
n246= _ clonepenalty kban
n247= _ maxlength 300
n248= _ sreq off
n249= _ autosend off
n250= _ maxkicked 4
n251= _ kickedmaxtime 120
n252= _ bankickeduser off
n253= _ autojoin off
n254= _ ctcpcloaking off
n255= _ operview off
n256= _ nethack 0
n257= _ defchannum 45
n258= _ nickregain off
n259= _ wordkick off
n260= _ nickkick off
n261= var %tmp = $readini -n $_mircini ident userid
n262= .identd on $iif(%tmp,%tmp,basic)
n263= if (%split.jump) unset % [ $+ [ $ifmatch ] ]
n264= if (%DefaultKickMessage == $null) set %DefaultKickMessage &nick& has left &chan&
n265= unset %allowed.umodes %ExitQuit %^* %_* %ibl.* %c.n %z.* %who.win %raw.whoresults %tmp %temp %max.* %ctcp.* %sound %showcomchan.*
n266= unset %.* %#*.bots %luser.* %tmp.* %temp?.* %*.tmp %*.temp %*.temp? %=comchan.* %temp.* %who.head %reject.* %repeat.count.*
n267= unset %:s %:f %tmp %split.jump %nc.chan %dns.host %nc.nick %slag 6 %a %b %c %d %e %f %g %h %i %j %k %l %m %n %o %p %q %r %s %t %u %v %w %x %y %z %send2ip.*
n268= unset %netsplitfile.* %amp.* %massping* %nameshow_II.* %s.tmp %server.version %tmp_switch | countsoundfiles
n269= flushini sys\main.ini
n270=}
n271=relwin if ($__var(last.,$1)) { if (($active ischan) || ($query($active)) || ($chat($remove($active,=)).status == active)) return 1 }
n272=rel relay $iif($2,$2,$active) $1
n273=relay {
n274= if ($relwin($2)) {
n275= var %relay = $__var(last.,$2)
n276= if ($format($2,%relay)) msg $1 $ifmatch
n277= else {
n278= var %type = $2, %targ = msg $1
n279= tokenize 32 %relay
n280= if (%type == relsm) %targ -> * $+ $1 $+ * $2-
n281= if (%type == relsn) %targ -> - $+ $1 $+ - $2-
n282= if (%type == reln) %targ - $+ $1 $+ - $2-
n283= if (%type = relm) %targ < $+ $1 $+ > $2-
n284= if (%type == relsc) %targ $chr(91) $+ $1 $+ $chr(93) $2-
n285= ;/set %last.relq $nick $address $1-
n286= if (%type == relc) %targ $chr(91) $+ $1 $3- $+ $chr(93)
n287= ;relcr $nick $address $1 %last.relcr
n288= if (%type == relcr) %targ $chr(91) $+ $1 $3 reply]: $4-
n289= ;relq *** drue has quit IRC (Read error: 0 (Undefined error: 0))
n290= ; $1 = nick, $2 = address, $3 = quit message
n291= if (%type == relq) %targ *** $1 has quit IRC ( $+ $3- $+ )
n292= }
n293= }
n294=}
n295=relc rel relc $1
n296=relcr rel relcr $1
n297=relm rel relm $1
n298=reln rel reln $1
n299=relq rel relq $1
n300=relsc rel relsc $1
n301=relsm rel relsm $1
n302=relsn rel relsn $1
n303=startup_add {
n304= var %i = 1
n305= while (%i <= 10) {
n306= if ($__var(StartUp.,%i) == $null) {
n307= if (($_isfile($1-) == $null) && ((http:* !iswm $1-) && (ftp:* !iswm $1-))) { .timer -m 1 0 startup_cnfrm %i $1- | halt }
n308= else { startup_store %i $1- | break }
n309= }
n310= inc %i
n311= }
n312=}
n313=startup_cnfrm { if ($_cnfrm( [ $2- ] does not seem to exist.&crlf;Do you want to add anyway?&crlf;Hint: When adding URLs, prefix them with http:// or ftp://)) startup_store $1- }
n314=startup_store { set %StartUp. $+ $1 $2- | if ($dialog(sl)) { did -a sl 6 $2- | did -r sl 3 } }
n315=startup_browse var %tmp = $dir="Select a program file to add" \*.exe | if ($dialog(sl)) { if (%tmp) did -a sl 3 %tmp | dialog -v sl }
n316=startup_rem {
n317= var %i = 1
n318= while (%i <= 10) {
n319= if ($__var(StartUp.,%i) == $1-) {
n320= unset %StartUp. [ $+ [ %i ] ]
n321= if ($didwm(sl,6,$1-)) did -d sl 6 $ifmatch
n322= break
n323= }
n324= inc %i
n325= }
n326=}
n327=startup_start {
n328= var %x = 1 | while ($isdde($bind(mIRCbasic,%x)) == $true) { inc %x | continue } | .ddeserver on $bind(mIRCbasic,%x)
n329= if (%x == 1) { var %i = 1 | while (%i <= 10) { if ($__var(StartUp.,%i)) run -n $ifmatch | inc %i } }
n330=}
n331=umod {
n332= if ($left($1,1) isin +-) var %umod.pre = : $+ $ifmatch, %.cumod = $mid($1,2,$len($1))
n333= elseif ($1 isletter) var %umod.pre = :+, %.cumod = $1
n334= else return
n335= var %.checkumode = $iif(%umod.pre == :+,%allowed.umodes,$remove($usermode,+)), %.newmodes, %umod.var = 1
n336= while (%umod.var <= $len(%.cumod)) {
n337= if ($mid(%.cumod,%umod.var,1) isincs %.checkumode) %.newmodes = %.newmodes $+ $mid(%.cumod,%umod.var,1)
n338= inc %umod.var
n339= }
n340= if (%.newmodes) .raw MODE $me %umod.pre $+ $ifmatch $2-
n341=}
n342=umode umod $1-
n343=whois.disp2 {
n344= var %Echo = $iif((($_mopt(2,26)) && (@* !iswm $active)),echo -atli,echo -slti)
n345= bind $c1 Ú $c4 Ä( $c3 whois $c1 )ÄÄÄÄÄÄ $c4 Ä $c1 ÄÄ-ÄÄ--ÄÄÄÄ $c4 ÄÄÄÄÄÄÄÄÄÄÄÄ- $c1 - $c4 Ä $c1 Ä $c4 -
n346= %Echo $result
n347= %Echo $bind(,$c1,|,$c3) %whois.nick $+ $c1 $+ ( $+ $c5 $+ $replace(%whois.uhost,@,$bind(,$c1,@,$c5)) $+ $+ $c1 $+ ) [ $+ $c3 $+ %whois.ccode $+ $+ $c1 $+ ]
n348= %Echo $+ $c1 $+ ³ $+ $c5 ircname $+ $c4 $+ : $ansi2mirc(%whois.wname)
n349= if (%whois.chan) {
n350= if ($len($strip(%whois.chan)) < 60) %Echo $+ $c1 $+ ³ $+ $c5 channels $+ $+ $c4 $+ : %whois.chan
n351= else {
n352= %Echo $+ $c1 $+ ³ $+ $c5 channels $+ $c4 $+ : $wordwrap(1,60,%whois.chan)
n353= var %c.var = 2
n354= while ($wordwrap(%c.var,60,%whois.chan)) {
n355= var %.ctmp = $ifmatch
n356= %Echo $+ $c1 $+ ³ $x(7) $+ $c4 $+ : %.ctmp
n357= inc %c.var
n358= }
n359= }
n360= }
n361= %Echo $+ $c1 $+ ³ $+ $c5 server $+ $c4 $+ : $wordwrap(1,60,%whois.serv)
n362= var %w.var = 2
n363= while ($wordwrap(%w.var,60,%whois.serv)) {
n364= var %s = $ifmatch
n365= %Echo $+ $c1 $+ ³ $+ $c4 $x(7) $+ $c4 $+ : %s
n366= inc %w.var
n367= }
n368= if (%whois.away) {
n369= %Echo $+ $c1 $+ | $+ $c5 away $x(2) $+ $c4 $+ : $wordwrap(1,60,%whois.away)
n370= var %t = 2
n371= while ($wordwrap(%t,60,%whois.away)) {
n372= var %.wa = $ifmatch
n373= %Echo $+ $c1 $+ ³ $x(7) $+ $c5 $+ : %.wa
n374= inc %t
n375= }
n376= }
n377= if (%whois.idle) {
n378= if (seconds !isin $gettok(%whois.idle,3,32)) %Echo $+ $c1 $+ ³ $+ $c5 idle $x(2) $+ $c4 $+ : $duration(%whois.idle)
n379= else %Echo $+ $c1 $+ ³ $+ $c5 idle $x(2) $+ $c4 $+ : $duration($gettok(%whois.idle,1,32)) $+ $c1 $+ ( $+ $c5 $+ sign on $+ $c4 $+ : $asctime($gettok(%whois.idle,2,32)) $+ $+ $c1 $+ )
n380= }
n381= if (%whois.oper) %Echo $+ $c1 $+ ³ $+ $c5 %whois.oper
n382= %Echo $+ $c1 $+ ÀÄ $+ $c4 $+ Ä $+ $c1 $+ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ $+ $c5 $+ ÄÄ $+ $c1 $+ - $+ $c4 $+ Ä $+ $c1 $+ ÄÄÄÄÄ $+ $c4 -- $+ $c1 $+ --
n383=}
n384=wi .raw WHOIS $$1 $1
n385=ww whowas $$1 $2-
n386=_botnetfld {
n387= if ($i(main,$bind(botnet_,$1)) != on) return
n388= _botnetfld² $1
n389= if ($_fldnet($1)) {
n390= var %:s = $i(main,$bind($1,.botnetignoretime))
n391= if (%s: !isnum) var %:s = 30
n392= var %:f = $replace($1,nick,nick changes,text,channel text,notice,notices,join,joins,invite,invites)
n393= if ($1 == CTCP) _fnig t %:s
n394= elseif ($1 == invite) {
n395= _fnig i %:s
n396= if ($2) gkb $2 Invite flood
n397= }
n398= elseif ($1 == notices) {
n399= _fnig n %:s
n400= if ($me isop $3) fkb $3 $2 Notice flood
n401= }
n402= elseif ($1 == text) {
n403= _fnig c %:s
n404= if ($me isop $3) {
n405= .raw MODE $3 +m
n406= fkb $3 $2 Public flood
n407= }
n408= }
n409= else {
n410= set $bind(-u,%:s) $_var(botnet.ignore.,$1) ACTIVE
n411= if (($1 == join) && ($me isop $3)) {
n412= .raw MODE $3 +i
n413= fkb $3 $2 Join flood
n414= }
n415= elseif ($2) gkb $2 $1 flood
n416= }
n417= iecho Possible $remove($1,s) flood detected from multiple sites. Ignoring all %:f for %:s seconds.
n418= }
n419=}
n420=_botnetfld² if ( %botnet.ignore. [ $+ [ $1 ] ] == ACTIVE) halt
n421=_hchat { var %c = 1 | while ($chat(%c)) { window $1 = $+ $chat(%c) | inc %c } }
n422=_hsend { var %i = $send(0) | while (%i) { window $1 "Send $send(%i) $send(%i).file $+ " | dec %i } }
n423=_hget { var %i = $get(0) | while (%i) { window $1 "Get $get(%i) $get(%i).file $+ " | dec %i } }
n424=_winbug return $iif((CON\ isin $1- || NUL isin $1- || AUX isin $1- || CLOCK$ isin $1- || CONFIG$ isin $1-),$true,$false)
n425=_loaddefaults {
n426= var %check1 = $read -ns[Strict] sys\main.ini, %check2 = $read -ns[Normal] sys\main.ini, %check3 = $read -ns[Lenient] sys\main.ini
n427= if ((%check1 == $null) || (%check2 == $null) || (%check3 == $null)) {
n428= var %com = write -a sys\main.ini
n429= %com [Strict]
n430= %com DefBanType=12
n431= %com nethack=1
n432= %com longword=on
n433= %com kickonban=on
n434= %com capskick=on
n435= %com clonejoin=on
n436= %com clonepenalty=kban
n437= %com nickkick=on
n438= %com wordkick=on
n439= %com bankickeduser=on
n440= %com exempted.users=1.0.0.0
n441= %com maxcaps=7
n442= %com maxlength=80
n443= %com maxclones=3
n444= %com maxkicked=3
n445= %com kickedmaxtime=60
n446= %com maxrepeat=3
n447= %com maxtext=4
n448= %com maxnotices=3
n449= %com maxdeop=3
n450= %com maxban=3
n451= %com repeat_time=10
n452= %com text_time=10
n453= %com notices_time=10
n454= %com deop_time=10
n455= %com ban_time=10
n456= %com repeat.bantime=300
n457= %com ctcp.bantime=600
n458= %com text.bantime=300
n459= %com nick.bantime=900
n460= %com notices.bantime=300
n461= %com joins.bantime=900
n462= %com deop.bantime=300
n463= %com kick.bantime=300
n464= %com ban.bantime=300
n465= %com nickkick.bantime=600
n466= %com wordkick.bantime=600
n467= %com invite.bantime=600
n468= %com capskick.bantime=300
n469= %com longword.bantime=300
n470= %com maxctcp=4
n471= %com maxnick=3
n472= %com maxjoins=3
n473= %com maxkick=3
n474= %com ctcp_time=10
n475= %com nick_time=10
n476= %com joins_time=10
n477= %com kick_time=10
n478= %com [Normal]
n479= %com DefBanType=3
n480= %com nethack=0
n481= %com longword=on
n482= %com kickonban=off
n483= %com capskick=on
n484= %com clonejoin=on
n485= %com clonepenalty=kick
n486= %com nickkick=on
n487= %com wordkick=on
n488= %com bankickeduser=on
n489= %com exempted.users=1.0.1.0
n490= %com maxcaps=10
n491= %com maxlength=100
n492= %com maxclones=4
n493= %com maxkicked=4
n494= %com kickedmaxtime=120
n495= %com maxrepeat=5
n496= %com maxtext=5
n497= %com maxnotices=5
n498= %com maxdeop=4
n499= %com maxban=4
n500= %com repeat_time=10
n501= %com text_time=15
n502= %com notices_time=10
n503= %com deop_time=15
n504= %com ban_time=15
n505= %com repeat.bantime=120
n506= %com ctcp.bantime=300
n507= %com text.bantime=120
n508= %com nick.bantime=120
n509= %com notices.bantime=0
n510= %com joins.bantime=300
n511= %com deop.bantime=60
n512= %com kick.bantime=60
n513= %com ban.bantime=60
n514= %com nickkick.bantime=180
n515= %com wordkick.bantime=180
n516= %com invite.bantime=300
n517= %com capskick.bantime=120
n518= %com longword.bantime=120
n519= %com maxctcp=5
n520= %com maxnick=5
n521= %com maxjoins=5
n522= %com maxkick=4
n523= %com ctcp_time=10
n524= %com nick_time=15
n525= %com joins_time=10
n526= %com kick_time=15
n527= %com [Lenient]
n528= %com DefBanType=2
n529= %com nethack=0
n530= %com longword=on
n531= %com kickonban=off
n532= %com capskick=on
n533= %com clonejoin=on
n534= %com clonepenalty=warn
n535= %com nickkick=off
n536= %com wordkick=off
n537= %com bankickeduser=off
n538= %com exempted.users=1.1.1.1
n539= %com maxcaps=30
n540= %com maxlength=300
n541= %com maxclones=3
n542= %com maxkicked=4
n543= %com kickedmaxtime=120
n544= %com maxrepeat=5
n545= %com maxtext=8
n546= %com maxnotices=7
n547= %com maxdeop=0
n548= %com maxban=0
n549= %com repeat_time=15
n550= %com text_time=10
n551= %com notices_time=10
n552= %com deop_time=0
n553= %com ban_time=0
n554= %com repeat.bantime=60
n555= %com ctcp.bantime=300
n556= %com text.bantime=0
n557= %com nick.bantime=120
n558= %com notices.bantime=0
n559= %com joins.bantime=300
n560= %com deop.bantime=0
n561= %com kick.bantime=0
n562= %com ban.bantime=0
n563= %com nickkick.bantime=180
n564= %com wordkick.bantime=180
n565= %com invite.bantime=300
n566= %com capskick.bantime=60
n567= %com longword.bantime=60
n568= %com maxctcp=5
n569= %com maxnick=7
n570= %com maxjoins=5
n571= %com maxkick=0
n572= %com ctcp_time=15
n573= %com nick_time=15
n574= %com joins_time=15
n575= %com kick_time=0
n576= }
n577=}
n578=; eof
[script]
n0=; backup
n1=alias backup backupwindow
n2=alias _backup {
n3= if ($window(@Backup) == $null) backupwindow
n4= var %total = 0
n5= if (%backup.win.file iswm *.ini) { .load -rs sys\dialog.ini | inc %total }
n6= var %h = 1, %alias = 0 | while ($script(%h)) { if (%backup.win.file iswm $ifmatch) inc %total | inc %h }
n7= %h = 1 | while ($alias(%h)) { if (%backup.win.file iswm $ifmatch) inc %total | inc %h }
n8= %z = 1 | var %i = 1 | while ($alias(%i)) { backup.do %total $ifmatch | inc %i }
n9= %i = 1 | while ($script(%i)) { backup.do %total $ifmatch | inc %i }
n10= if (%backup.win.file iswm *.ini) .copy -o " $+ $mircdir $+ sys\popups.ini" " $+ [ %backup.win.defaultpath ] $+ popups.ini"
n11= .timerBackuptbar 1 1 titlebar @Backup - Closing... please wait
n12= if ($script(dialog.ini)) .unload -rs $ifmatch
n13= .timerBackup 1 3 window -c @Backup
n14= %backup.closing = $true
n15= unset %backup.win.*
n16=}
n17=; /backup.do current total filename
n18=alias -l backup.do {
n19= if (%backup.win.file !iswm $2-) return | inc %z
n20= .copy -o " $+ $2- $+ " " $+ %backup.win.defaultpath $+ $nopath($2-) $+ "
n21= var %perc = $percent(%z,$1)
n22= drawrect -f @Backup 2 1 31 111 $calc(243 * ($int($remove(%perc,%)) / 100)) 13
n23= titlebar @Backup - $int(%perc) $+ %
n24=}
n25=alias backupwindow {
n26= ;if ($server) { s.err WARNING: Please leave all channels, and disconnect from IRC when attempting to back-up files to prevent corrupted files! | halt }
n27= if ($_cnfrm(Continue back-up? This will close other instances of Basic and part all channels and disconnect from IRC for safety reasons.) == $false) halt
n28= if ($server) disconnect | partall | _bexit -exempt
n29= window -fpk +tn @Backup $mwin(300,160) 300 160 @Backup
n30= drawrect -rnf @Backup $rgb(face) 0 0 0 $window(@Backup).w $window(@Backup).h
n31= drawtext -rn @Backup $rgb(text) "MS Sans Serif" 14 10 13 Backup dir:
n32= %backup.win.ok = $leftbutton(@Backup,75) $ypos(@Backup,25) 75 25
n33= %backup.win.cancel = $rightbutton(@Backup,3) $ypos(@Backup,25) 75 25
n34= %backup.win.dir = 70 8 200 25
n35= %backup.win.defaultpath = $backupdir
n36= %backup.win.file = *.ini
n37= %backup.closing = $false
n38= bd -h @Backup %backup.win.ok Backup
n39= bd -h @Backup %backup.win.cancel Close
n40= bd -h @Backup %backup.win.dir $short(%backup.win.defaultpath,25)
n41= drawradio @Backup 70 50 on Backup loaded .ini files only.
n42= drawradio @Backup 70 70 Backup loaded .mrc files only.
n43= drawradio @Backup 70 90 Backup all loaded files.
n44= 3d -rn @Backup $rgb(shadow) $rgb(hilight) 30 110 245 15
n45= drawdot @Backup
n46=}
n47=menu @Backup {
n48= sclick:{
n49= if (%backup.closing) halt
n50= if ($inr(%backup.win.ok)) depress $active $ifmatch Backup
n51= if ($inr(%backup.win.dir)) depress $active $ifmatch $short(%backup.win.defaultpath,25)
n52= if ($inr(%backup.win.cancel)) depress $active $ifmatch Close
n53= if ($inr(70,50,10,10)) { %backup.win.file = *.ini | drawradio $active 70 50 on | drawradio $active 70 70 off | drawradio $active 70 90 off }
n54= if ($inr(70,70,10,10)) { %backup.win.file = *.mrc | drawradio $active 70 70 on | drawradio $active 70 50 off | drawradio $active 70 90 off }
n55= if ($inr(70,90,10,10)) { %backup.win.file = *.* | drawradio $active 70 90 on | drawradio $active 70 50 off | drawradio $active 70 70 off }
n56= }
n57= leave:if (%backup.closing) halt | backup.restore
n58= uclick:{
n59= if (%backup.closing) halt
n60= backup.restore
n61= if ($inr(%backup.win.ok)) _backup
n62= if ($inr(%backup.win.dir)) {
n63= bd -n $active $ifmatch $short(%backup.win.defaultpath,25)
n64= drawdot $active
n65= %backup.win.defaultpath = $$sdir="Select a directory to place your backup files"
n66= if (%backup.win.defaultpath == [ $mircdir [ $+ [ sys\ ] ] ] ) {
n67= s.err Invalid directory!
n68= %backup.win.defaultpath = $backupdir
n69= backup.restore
n70= }
n71= else backup.restore
n72= }
n73= if ($inr(%backup.win.cancel)) backup.cancel
n74= }
n75=}
n76=alias backupdir {
n77= return $mircdir $+ backup\
n78=}
n79=alias -l backup.restore {
n80= bd -n @Backup %backup.win.ok Backup
n81= bd -n @Backup %backup.win.cancel Close
n82= bd -n @Backup %backup.win.dir $short(%backup.win.defaultpath,25)
n83= drawdot @Backup
n84=}
n85=alias -l backup.cancel {
n86= unset %backup.win.*
n87= .timer -m 1 0 window -c @Backup
n88=}
n89=alias -l depress { bd -i $1- | drawdot $1 }
n90=; end backup
n91=on *:MP3END:{
n92= if (%mp3qfiles) {
n93= var %mp3end = $gettok($ifmatch,1,124)
n94= if (%mp3end) {
n95= _mpxdo %mp3qtarg. [ $+ [ $shortfn(%mp3end) ] ] %mp3end
n96= unset %mp3qtarg. [ $+ [ $shortfn(%mp3end) ] ]
n97= }
n98= %mp3qfiles = $remtok(%mp3qfiles,%mp3end,124)
n99= }
n100=}
n101=alias volume {
n102= if (%volume.coords == $null) %volume.coords = $mwin(300,100) 300 100
n103= if (%volume.bgcolor !isnum 0-15) %volume.bgcolor = 1
n104= if (%volume.textcolor !isnum 0-15) %volume.textcolor = 0
n105= if (%volume.fontname == $null) %volume.fontname = "Arial"
n106= if (%volume.fontsize !isnum) %volume.fontsize = 14
n107= if (%volume.barcolor !isnum 0-15) %volume.barcolor = 2
n108= if (%volume.bordercolor !isnum 0-15) %volume.bordercolor = 12
n109= window -pk +ftn @Volume %volume.coords @Volume
n110= drawrect -f @Volume %volume.bgcolor 0 0 0 300 100
n111= drawtext @Volume %volume.textcolor %volume.fontname %volume.fontsize 10 10 MP3/Wave
n112= drawtext @Volume %volume.textcolor %volume.fontname %volume.fontsize 10 30 Midi
n113= drawtext @Volume %volume.textcolor %volume.fontname %volume.fontsize 10 50 Master
n114= drawrect @Volume %volume.bordercolor 1 80 12 120 10
n115= drawrect @Volume %volume.bordercolor 1 80 32 120 10
n116= drawrect @Volume %volume.bordercolor 1 80 52 120 10
n117= %volume.mp3pos = $calc(118 * ($remove($_perc($vol(mp3),65000),%) / 100))
n118= %volume.midipos = $calc(118 * ($remove($_perc($vol(midi),65000),%) / 100))
n119= %volume.masterpos = $calc(118 * ($remove($_perc($vol(master),65000),%) / 100))
n120= drawrect -f @Volume %volume.barcolor 1 81 13 %volume.mp3pos 8
n121= drawrect -f @Volume %volume.barcolor 1 81 33 %volume.midipos 8
n122= drawrect -f @Volume %volume.barcolor 1 81 53 %volume.masterpos 8
n123= drawtext @Volume %volume.textcolor %volume.fontname %volume.fontsize 220 10 Mute
n124= drawtext @Volume %volume.textcolor %volume.fontname %volume.fontsize 220 50 Mute
n125= drawmuteboxes
n126=}
n127=alias -l drawmuteboxes {
n128= drawrect -f @Volume %volume.bgcolor 1 250 13 10 10
n129= drawrect -f @Volume %volume.bgcolor 1 250 53 10 10
n130= drawrect @Volume %volume.bordercolor 1 250 13 10 10
n131= drawrect @Volume %volume.bordercolor 1 250 53 10 10
n132= if ($vol(mp3).mute) drawtext @Volume %volume.textcolor Marlett 13 248 11 a
n133= if ($vol(master).mute) drawtext @Volume %volume.textcolor Marlett 13 248 51 a
n134=}
n135=alias -l mute {
n136= bind - $iif($1 == master,v,$left($1,1)) u $iif($vol($1).mute == 1,2,1)
n137= vol $result
n138= drawmuteboxes
n139=}
n140=menu @Volume {
n141= sclick:{
n142= if ($inr(250,13,10,10)) mute wave
n143= if ($inr(250,33,10,10)) mute midi
n144= if ($inr(250,53,10,10)) mute master
n145= }
n146= mouse:{
n147= if ($mouse.key & 1) {
n148= if ($inr(80,12,120,10)) _vol mp3 13
n149= elseif ($inr(80,32,120,10)) _vol midi 33
n150= elseif ($inr(80,52,120,10)) _vol master 53
n151= }
n152= }
n153= Background...:if ($inputbox(Enter a number between 0 to 15"Volume window background color) isnum 0-15) { %volume.bgcolor = $ifmatch | volume }
n154= Bar...:if ($inputbox(Enter a number between 0 to 15"Volume progress bar color) isnum 0-15) { %volume.barcolor = $ifmatch | volume }
n155= Border...:if ($inputbox(Enter a number between 0 to 15"Volume progress bar border color) isnum 0-15) { %volume.bordercolor = $ifmatch | volume }
n156= Text...:if ($inputbox(Enter a number between 0 to 15"Volume text color) isnum 0-15) { %volume.textcolor = $ifmatch | volume }
n157= Font...:if ($_vfont != cancel) { %volume.fontname = $ifmatch | %volume.fontsize = %.fontsize | volume }
n158= -
n159= Close:window -c $active
n160=}
n161=on *:close:@Volume:%volume.coords = $window($target).x $window($target).y $window($target).w $window($target).h
n162=; stolen from P&P
n163=alias _vfont {
n164= window -pfh +d @.pickfont 50 50 1 1 cancel 13
n165= window -a @.pickfont | font
n166= if ($window(@.pickfont).font == cancel) { window -c @.pickfont | return }
n167= var %font = $window(@.pickfont).font
n168= %.fontsize = $window(@.pickfont).fontsize
n169= window -c @.pickfont | return " $+ %font $+ "
n170=}
n171=; end stolen code
n172=alias _vol {
n173= if (%volume.vol [ $+ [ $1 ] ] == $null) %volume.vol [ $+ [ $1 ] ] = $vol($1)
n174= if ($calc($mouse.x - 80) < %volume. [ $+ [ $1 ] $+ ] pos) {
n175= dec %volume.vol $+ $1 550
n176= vol $iif($1 == mp3,-w,$iif($1 == midi,-m,-v)) %volume.vol [ $+ [ $1 ] ]
n177= %volume. [ $+ [ $1 ] $+ ] pos = $calc(118 * ($remove($_perc($vol($1),65000),%) / 100))
n178= drawrect -f @Volume %volume.bgcolor 1 81 $2 118 8
n179= drawrect -f @Volume %volume.barcolor 1 81 $2 %volume. [ $+ [ $1 ] $+ ] pos 8
n180= }
n181= elseif (($calc($mouse.x - 80) > %volume. [ $+ [ $1 ] $+ ] pos) || ($mouse.x isnum 80-81)) {
n182= inc %volume.vol $+ $1 550
n183= vol $iif($1 == mp3,-w,$iif($1 == midi,-m,-v)) %volume.vol [ $+ [ $1 ] ]
n184= %volume. [ $+ [ $1 ] $+ ] pos = $calc(118 * ($remove($_perc($vol($1),65000),%) / 100))
n185= drawrect -f @Volume %volume.barcolor 1 81 $2 %volume. [ $+ [ $1 ] $+ ] pos 8
n186= }
n187= titlebar $active $upper($1) $+ : $_perc($vol($1),65000)
n188= .timer.tact 1 1 t.act $active
n189=}
n190=alias -l t.act if ($window($1)) titlebar $1
n191=; end volume
n192=alias vk {
n193= if (($1 ischan) && ($me isop $1)) { if ($2) _vk $1 $2- | else bhelp vk }
n194= elseif (($1) && ($me isop $active)) _vk $active $1-
n195= else bhelp vk
n196=}
n197=alias _vk {
n198= if ($me !isop $1) { iecho You must have ops to do that. | halt }
n199= var %i = 1 | while ($nick($1,%i,r)) { var %nick = $ifmatch | set $_var(VersionKick.,%nick) $2- | set $_var(VersionChan.,%nick) $1 | inc %i }
n200= .ctcp $1 VERSION | iecho Version filtering " $+ $2- $+ "
n201=}
n202=on *:CTCPREPLY:*:{
n203= if (($__var(VersionKick.,$nick) isin $2-) && ($me isop $__var(VersionChan.,$nick))) kick $__var(VersionChan.,$nick) $nick Version Kick! Use another client!
n204= unset $_var(VersionChan.,$nick) $_var(VersionKick.,$nick)
n205=}
n206=on *:CONNECT:unset %Last*
n207=on *:TEXT:*:?:set %LastMessage $nick | set %last.relm $nick $1-
n208=on *:OPEN:?:set %LastQuery $nick | set %last.relm $nick $1-
n209=on *:NOTICE:*:*:set %LastNotice $nick | set %last.reln $nick $1-
n210=on *:QUIT:set %last.relq $nick $address $1-
n211=ctcp *:*:*:set %last.relq $nick $address $1-
n212=alias lm if (%LastMessage) editbox -ap /msg $ifmatch
n213=alias lq if (%LastQuery) editbox -ap /query $ifmatch
n214=alias ln if (%LastNotice) editbox -ap /notice $ifmatch
n215=on @*:BAN:#:set $_var(LastBan,$chan) $banmask
n216=on @*:UNBAN:#:set $_var(LastUnban,$chan) $banmask
n217=on @*:RAWMODE:#:set $_var(LastRawMode,$chan) $1-
n218=on @*:JOIN:#:set $_var(LastJoin,$chan) $nick
n219=alias lb { if ($last($active,Ban)) { mode $active -b $ifmatch | unset $_var(LastBan,$active) } }
n220=alias lu { if ($last($active,Unban)) { mode $active +b $ifmatch | unset $_var(LastUnban,$active) } }
n221=alias lj { if ($last($active,Join)) { kb $ifmatch $iif($2,$2-,bye) | unset $_var(LastJoin,$active) } }
n222=alias undo {
n223= if ($last($active,RawMode)) {
n224= var %i = 1, %modes = $gettok($ifmatch,1,32), %target = $gettok($ifmatch,2-,32), %newmodes
n225= while ($mid(%modes,%i,1)) {
n226= var %tmp = $ifmatch
n227= if (%tmp == +) %newmodes = %newmodes $+ -
n228= elseif (%tmp == -) %newmodes = %newmodes $+ +
n229= else %newmodes = %newmodes $+ %tmp
n230= inc %i
n231= }
n232= mode $active %newmodes %target
n233= unset $_var(LastRawmode,$active)
n234= }
n235=}
n236=alias last if (($me isop $1) && ($__var(Last,$2,$1))) return $__var(Last,$2,$1)
n237=;nick completion
n238=alias nc {
n239= if ($1 ison #) return $1
n240= var %n = 1, %m
n241= while ($nick(#,%n)) {
n242= var %m = $ifmatch
n243= if ($right(%m,-1) == $1) return %m
n244= inc %n
n245= }
n246= return $1
n247=}
n248=alias nc.ial {
n249= if ($1 ison #) return $1
n250= var %n = $1 $+ *
n251= if ($ialchan(%n,#,1).nick) return $ifmatch
n252= if ($ial(%n,1).nick) return $ifmatch
n253= var %n = * $+ $1 $+ *
n254= if ($ialchan(%n,#,1).nick) return $ifmatch
n255= if ($ial(%n,1).nick) return $ifmatch
n256= return $1
n257=}
n258=alias nm {
n259= var %match_nicks, %nickcompvar = 1, %n = $1 $+ *
n260= while ($ialchan(%n,#,%nickcompvar).nick) {
n261= var %nick = $ifmatch
n262= if ((%n iswm %nick) || (($len($1) < 3) && ($1 isin %nick))) var %match_nicks = $addtok(%match_nicks,%nick,44)
n263= inc %nickcompvar
n264= }
n265= return %match_nicks
n266=}
n267=alias ncomp.style {
n268= goto $iif($2 isnum 1-12,$2,$iif($i(nickcomp,style),$i(nickcomp,style),6))
n269= :1
n270= if ($len($1) == 1) return $1
n271= if ($len($1) == 2) return $+ $left($1,1) $+ $+ $right($1,1)
n272= if ($len($1) == 3) return $+ $left($1,1) $+ $+ $mid($1,2,1) $+ $+ $right($1,1) $+
n273= return $+ $left($1,2) $+ $+ $mid($1,3,$calc($len($1) - 3)) $+ $+ $right($1,1) $+
n274= :2
n275= if ($len($1) == 1) return $1
n276= if ($len($1) == 2) return $+ $left($1,1) $+ $+ $right($1,1)
n277= return $+ $left($1,1) $+ $+ $mid($1,2,$calc($len($1) - 2)) $+ $+ $right($1,1) $+
n278= :3
n279= if ($len($1) == 1) return $1
n280= if ($len($1) == 2) return $+ $left($1,1) $+ $+ $right($1,1)
n281= return $+ $left($1,1) $+ $+ $mid($1,2,$calc($len($1) - 2)) $+ $+ $right($1,1) $+
n282= :4
n283= return $+ $1 $+
n284= :5
n285= return $+ $1 $+
n286= :6
n287= return $1
n288= :7
n289= if ($len($1) == 1) return $1
n290= if ($len($1) == 2) return $+ $left($1,1) $+ $+ $right($1,1)
n291= if ($len($1) == 3) return $+ $left($1,1) $+ $+ $mid($1,2,1) $+ $+ $right($1,1) $+
n292= return $+ $left($1,2) $+ $+ $mid($1,3,$calc($len($1) - 3)) $+ $+ $right($1,1) $+
n293= :8
n294= if ($len($1) == 1) return $+ $1 $+
n295= return $+ $left($1,1) $+ $+ $right($1,-1)
n296= :9
n297= return $+ $1 $+
n298= :10
n299= if ($1 isop $active) return @ $+ $1
n300= if ($1 isvo $active) return + $+ $1
n301= return $1
n302= :11
n303= return ! $+ $1 $+ !
n304= :12
n305= return $+ $left($1,$int($calc($len($1) / 2))) $+ $+ $right($1, [ - $+ [ $int($calc($len($1) / 2)) ] ] )
n306=}
n307=alias _nc.init {
n308= if (($_nc(set) == 0) || ($_nc(set) == $null)) mdid² -b $1 191 217
n309= else did -c $1 230
n310=
n311= if ($_nc(char) == :) did -c $1 192
n312= elseif ($_nc(char) == $chr(59)) did -c $1 193
n313= elseif ($_nc(char) == ,) did -c $1 194
n314=
n315= if ($_nc(charstyle) == &b) did -c $1 197
n316= elseif ($_nc(charstyle) == &u) did -c $1 198
n317= else did -c $1 196
n318=
n319= if (($_nc(channels) == *) && ($_nc(exemptchan) == $null)) did -c $1 200
n320= elseif ($_nc(channels) == *) {
n321= did -c $1 202
n322= if ($_nc(exemptchan)) did -a $1 204 $ifmatch
n323= }
n324= elseif ($_nc(channels)) {
n325= did -a $1 203 $ifmatch
n326= did -c $1 201
n327= }
n328=
n329= did -c $1 $add($_nc(style),205)
n330=}
n331=alias _nc.click {
n332= ; /_nc.click dialog id
n333= if ($2 isnum 206-217) _set nickcomp style $sub($2,205)
n334= if ($2 == 192) _set nickcomp char :
n335= if ($2 == 193) _set nickcomp char ;
n336= if ($2 == 194) _set nickcomp char ,
n337= if ($2 == 196) _unset nickcomp charstyle
n338= if ($2 == 197) _set nickcomp charstyle &b
n339= if ($2 == 198) _set nickcomp charstyle &u
n340= if ($2 == 230) {
n341= _set nickcomp set $did($1,$2).state
n342= mdid² $iif($did($1,$2).state,-e,-b) $1 191 217
n343= }
n344=}
n345=alias _nc.grab {
n346= ; /_nc.grab dialog id
n347= if ($did($1,200).state) {
n348= _unset nickcomp exemptchan
n349= _set nickcomp channels *
n350= }
n351= if ($did($1,201).state) {
n352= if ($did($1,203)) _set nickcomp channels $ifmatch
n353= }
n354= if ($did($1,202).state) {
n355= if ($did($1,204)) {
n356= _set nickcomp exemptchan $ifmatch
n357= _set nickcomp channels *
n358= }
n359= }
n360=}
n361=alias _nc return $i(nickcomp,$1)
n362=alias ncomp.cprev {
n363= if ($ncomp.bmp) return
n364= var %nc = 1, %me = blue-elf
n365= while (%nc <= 12) {
n366= var %nw = @nc $+ %nc
n367= window -ph +f %nw 0 0 53 27
n368= drawrect -f %nw 1 1 0 0 99 99
n369= if (%nc == 4) drawtext -pb %nw 0 1 "MS Sans Serif" 11 2 2 $ncomp.style(%me,%nc)
n370= elseif (%nc == 10) drawtext -pb %nw 0 1 "MS Sans Serif" 11 1 2 $ncomp.style(%me,%nc)
n371= elseif (%nc >= 11) drawtext -pb %nw 0 1 "MS Sans Serif" 11 4 2 $ncomp.style(%me,%nc)
n372= else drawtext -pb %nw 0 1 "MS Sans Serif" 11 6 2 $ncomp.style(%me,%nc)
n373= drawsave %nw sys\ $+ $remove(%nw,@) $+ .bmp
n374= .timer 1 1 close -@ %nw
n375= inc %nc
n376= }
n377=}
n378=alias ncomp.bmp {
n379= var %b = 1
n380= while (%b <= 12) {
n381= var %tmp = sys\nc $+ %b $+ .bmp
n382= if ($_isfile(%tmp) == $null) return $false
n383= inc %b
n384= }
n385= return $true
n386=}
n387=alias -l ncsend {
n388= %nc.final = $ncomp.style($sline(@Nicks,1),%nc.style) $+ %nc.char %nc.text
n389= .raw PRIVMSG %nc.chan : $+ %nc.final
n390= if ($format(channel_text,%nc.chan,$me,$gettok($address($me,5),2-,33),%nc.final)) echo -tli14 %nc.chan $ifmatch
n391= else {
n392= bracketcheck
n393= var %o = $+ $c2 $+ @, %v = $+ $c2 $+ +, %me = $_op($me,%nc.chan).other, %me2 = $+ $c3 $+ $me $+
n394= if (%nickalign == right) var %me = $+ $c1 $+ %bracket.right $+ $+ $c3 $+ $replace($_align(11,%me),@,%o,+,%v,$me,%me2,*, ) $+ $+ $c1 $+ %bracket.left $+
n395= else var %me = $+ $c1 $+ %bracket.right $+ $+ $c3 $+ $replace($align(11,%me),@,%o,+,%v,$me,%me2,*, ) $+ $+ $c1 $+ %bracket.left $+
n396= echo $colour(own text) -lti14 %nc.chan $iif($_mopt(0,23),%me,$bind(,$c1,%bracket.left,)) $repb(%nc.final)
n397= }
n398= close -@ @Nicks
n399= unset %nc.*
n400=}
n401=menu @Nicks {
n402= dclick:ncsend
n403= $iif($sline(@Nicks,1),&Send to [ $sline(@Nicks,1) ] ):ncsend
n404= -
n405= &Cancel:{
n406= unset %nc.*
n407= close -@ @Nicks
n408= }
n409=}
n410=on &*:INPUT:#:{
n411= if (/* iswm $1) { goto end }
n412= if ($1 == *: || $1 == *; || $1 == *,) {
n413= set -n %_in.text $1-
n414= goto s
n415= }
n416= if (($_nc(set) == 0) || ($_nc(channels) == $null) || ($istok($_nc(exemptchan),$active,44))) {
n417= set -n %_in.text $1-
n418= goto s
n419= }
n420= if ((($_nc(channels) == *) || ($istok($_nc(channels),$active,44))) && ($right($1,1) == $_nc(char))) {
n421= %nc.char = $_nc(char)
n422= %nc.charstyle = $_nc(charstyle)
n423= if (%nc.charstyle) {
n424= %nc.char = %nc.charstyle $+ %nc.char $+ %nc.charstyle
n425= %nc.char = $replace(%nc.char,&b,,&u,)
n426= }
n427= %nc.style = $_nc(style)
n428= %nc.nick = $remove($1,$strip(%nc.char))
n429= %nc.chan = $active
n430= %nc.text = $2-
n431= if (%nc.nick ison %nc.chan) {
n432= set -n %_in.text $ncomp.style($nc.ial(%nc.nick),%nc.style) $+ %nc.char $2-
n433= goto s
n434= }
n435= if ($nc(%nc.nick) ison %nc.chan) {
n436= set -n %_in.text $ncomp.style($nc(%nc.nick),%nc.style) $+ %nc.char $2-
n437= goto s
n438= }
n439= if ($nm(%nc.nick) == $null) {
n440= set -n %_in.text $1-
n441= goto s
n442= }
n443= %nc.nick = $nm(%nc.nick)
n444= if (, !isin %nc.nick) {
n445= set -n %_in.text $ncomp.style(%nc.nick,%nc.style) $+ %nc.char $2-
n446= goto s
n447= }
n448= set -n %nc.text $2-
n449= window -ksl +ftn @Nicks $mwin(320,175) 320 175 @Nicks
n450= titlebar @Nicks - Double click a nick to send text
n451= var %n = 1
n452= while ($gettok(%nc.nick,%n,44)) {
n453= aline @Nicks $ifmatch
n454= inc %n
n455= }
n456= halt
n457= }
n458= set -n %_in.text $1-
n459= :s
n460= if (($1 == $null) && ($left($1,1) != $null)) say $!null $2-
n461= elseif ((%_in.text == $null) && ($left(%_in.text,1) == $null)) say
n462= else say %_in.text
n463= halt
n464= :end
n465= if ($ctrlenter) {
n466= say $1-
n467= halt
n468= }
n469=}
n470=on *:START:ncomp.cprev
n471=; version check
n472=alias vercheck { sockclose cv | sockopen cv www.geocities.com 80 | vprog Attempting to connect to server... | unset %vprog %cv | set %vercheck NULL }
n473=on *:sockopen:cv:{
n474= if ($sockerr) { vprog Unable to connect to server. Try again later. | did -o cv 1 1 &Close | sockclose cv | .timer 1 3 vclose | halt }
n475= sockwrite -n cv GET /Athens/Bridge/3568/version.html
n476= vprog Connected to server. Checking for new version..
n477=}
n478=on *:sockread:cv:{
n479= if ($sockerr) { vprog Connection Error. Disconnected. | .timer 1 3 vclose | sockclose cv | return }
n480= sockread %cv
n481= while ($sockbr) {
n482= if (%cv) vdisp %cv
n483= }
n484= vprog %vprog Connection closed.
n485= did -o cv 1 1 &Close
n486= .timer 1 3 vclose
n487= unset %cv %vprog %vercheck
n488= sockclose cv
n489=}
n490=alias -l vdisp {
n491= if (($2 isnum) && ($len($2) == 8) && (%vercheck == NULL)) {
n492= unset %vercheck
n493= if ($2 > $basic.ver) { vprog There is a new version of Basic. | did -o cv 1 1 &Download | sockclose cv | halt }
n494= elseif ($2 == $basic.ver) { vprog Current version: $2 $crlf Your version: $basic.ver $crlf You have the latest version available. | did -o cv 1 1 &Close | .timer 1 3 vclose | sockclose cv | halt }
n495= elseif ($basic.ver > $2) { vprog You're either blue-elf or he made an error naming the version number. Please email belf@usa.net about this. }
n496= else { vprog Unable to retrieve version info. Closing... | did -o cv 1 1 &Close | .timer 1 3 vclose | sockclose cv | halt }
n497= }
n498= else { if (%vercheck == NULL) vprog Unable to find version info. | unset %vercheck | sockclose cv | halt }
n499=}
n500=dialog cv {
n501= title "Version check"
n502= size -3 -3 150 50
n503= option dbu
n504= button "&Abort", 1, 60 33 35 14, ok
n505= text "", 2, 25 7 100 22, center
n506=}
n507=on *:dialog:cv:sclick:1:sockclose cv | if ($dialog(cv)) { if ($did(cv,1) == &Download) run http://www.geocities.com/basic_mirc/ }
n508=alias -l vprog { if ($dialog(cv) == $null) dialog -m cv cv | if ($1) did -o cv 2 1 $1- }
n509=alias -l vclose if ($dialog(cv)) dialog -x cv
n510=; Function keys
n511=alias F1 $func(F1)
n512=alias F2 $func(F2)
n513=alias F3 $func(F3)
n514=alias F4 $func(F4)
n515=alias F5 $func(F5)
n516=alias F6 $func(F6)
n517=alias F7 $func(F7)
n518=alias F8 $func(F8)
n519=alias F9 $func(F9)
n520=alias F10 $func(F10)
n521=alias F11 $func(F11)
n522=alias F12 $func(F12)
n523=alias cF1 $func(cF1)
n524=alias cF2 $func(cF2)
n525=alias cF3 $func(cF3)
n526=alias cF4 $func(cF4)
n527=alias cF5 $func(cF5)
n528=alias cF6 $func(cF6)
n529=alias cF7 $func(cF7)
n530=alias cF8 $func(cF8)
n531=alias cF9 $func(cF9)
n532=alias cF10 $func(cF10)
n533=alias cF11 $func(cF11)
n534=alias cF12 $func(cF12)
n535=alias sF1 $func(sF1)
n536=alias sF2 $func(sF2)
n537=alias sF3 $func(sF3)
n538=alias sF4 $func(sF4)
n539=alias sF5 $func(sF5)
n540=alias sF6 $func(sF6)
n541=alias sF7 $func(sF7)
n542=alias sF8 $func(sF8)
n543=alias sF9 $func(sF9)
n544=alias sF10 $func(sF10)
n545=alias sF11 $func(sF11)
n546=alias sF12 $func(sF12)
n547=; dcc time
n548=on *:open:=:set %dcc.chat. $+ $nick $ctime
n549=on *:open:!:set %dcc.fserv. $+ $nick $ctime
n550=alias dccecho {
n551= if ($dccs == 0) { iecho No active DCC's | halt }
n552= var %c = echo -a, %p = 1
n553= var %l = &c1Ú(&c3#&c1)Ä(&c3Type&c1)ÄÄ(&c3Nick&c1)ÄÄÄÄ(&c3Name/Status&c1)ÄÄÄÄ(&c3Size&c1)ÄÄÄÄ(&c3Pct&c1)ÄÄ(&c3Speed&c1)ÄÄÄÄ(&c3Time&c1)Ä -¿
n554= %c $replace(%l,&c1,$c1,&c3,$c3)
n555= var %d = 1, %b = $+ $c1 $+ ³
n556= while ($send(%d)) {
n557= %c %b $align(3,$plugz(%p,2)) $align(6,SEND) $align(9,$send(%d)) $align(17,$iif($send(%d).status == waiting,waiting,$send(%d).file)) $align(9,$_bytes($send(%d).size)) $align(5,$bind($send(%d).pc,$chr(37))) $align(10,$iif($send(%d).status != waiting,$cps2kb($send(%d).cps),--)) $_z($eta($send(%d).size,$send(%d).sent,$send(%d).cps)) %b
n558= inc %d
n559= inc %p
n560= }
n561= var %d = 1
n562= while ($get(%d)) {
n563= %c %b $align(3,$plugz(%p,2)) $align(6,GET) $align(9,$get(%d)) $&
n564= $align(17,$iif($get(%d).status == waiting,waiting,$get(%d).file)) $&
n565= $align(9,$_bytes($get(%d).size)) $align(5,$bind($get(%d).pc,$chr(37))) $&
n566= $align(10,$iif($get(%d).status != waiting,$cps2kb($get(%d).cps),--)) $_z($eta($get(%d).size,$get(%d).rcvd,$get(%d).cps)) %b
n567= inc %d
n568= inc %p
n569= }
n570= var %d = 1
n571= while ($chat(%d)) {
n572= %c %b $align(3,$plugz(%p,2)) $align(6,CHAT) $align(9,$chat(%d)) $align(17,$chat(%d).status) $&
n573= $align(9,--) $align(5,--) $align(10,--) $&
n574= $durtf( $duration( $calc( $ctime - %dcc.chat. [ $+ [ $chat(%d) ] ] ) ) ) %b
n575= inc %d
n576= inc %p
n577= }
n578= var %d = 1
n579= while ($fserv(%d)) {
n580= %c %b $align(3,$plugz(%p,2)) $align(6,FSERVE) $align(9,$fserv(%d)) $align(17,$fserv(%d).status) $&
n581= $align(9,--) $align(5,--) $align(10,--) $&
n582= $durtf( $duration( $calc( $ctime - %dcc.fserv. [ $+ [ $fserv(%d) ] ] ) ) ) %b
n583= inc %d
n584= inc %p
n585= }
n586= var %dtotal = ( $+ $c3 $+ Total: $send(0) $+ s/ $+ $get(0) $+ g/ $+ $chat(0) $+ c/ $+ $fserv(0) $+ f $+ $+ $c1 $+ )
n587= var %dline = ÀÄÄÄ- $+ $c2 $+ -- $+ $c3 $+ - $+ $c1 $+ Ä- -
n588= var %stuff = ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
n589= %c $+ $c1 $+ %dline $+ $left(%stuff,$calc(63 - $len($strip(%dtotal)))) $+ %dtotal $+ ÄÙ
n590=}
n591=alias durtf {
n592= var %_hrs = $remove($wildtok($1,*hr*,1,32),hr,s), %_min = $remove($wildtok($1,*min*,1,32),min,s), %_sec = $remove($wildtok($1,*sec*,1,32),sec,s)
n593= if (%_hrs == $null) %_hrs = 00
n594= if (%_min == $null) %_min = 00
n595= if (%_sec == $null) %_sec = 00
n596= return $bind($plugz(%_hrs,2),:,$plugz(%_min,2),:,$plugz(%_sec,2))
n597=}
n598=alias plugz return $str($chr(48),$calc($2 - $len($1))) $+ $1
n599=alias -l _z {
n600= if ($1 == :00) return 00:00 $+ $1
n601= if ($count($1,:) == 1) {
n602= if ($len($gettok($1,1,58)) == 1) return 00:0 $+ $1
n603= return 00: $+ $1
n604= }
n605= return $1
n606=}
n607=alias gd {
n608= var %nick = $remove($_op($1,$2).other,*), %addy = $gettok($address($1,5),2,33)
n609= if ($format(showusers,%nick,%addy)) { $ifmatch | return }
n610= var %c = &c4@&c3, %v = &c4+&c3, %o = &c4@&c3
n611= var %ident = $gettok(%addy,1,64), %host = $gettok(%addy,2,64)
n612= var %mask = &c1[&c3 $+ $_align(10,%ident) $+ %c $+ $align(35,%host) $+ &c1]
n613= if ($left(%nick,1) !isin @+) var %line = &c1[&c3 $+ $align(10,%nick) $+ &c1] %mask
n614= else var %line = &c1[ $+ $replace($align(11,%nick),@,%o,+,%v) $+ &c1] %mask
n615= echo -lti14 $2 $replace(%line,&c1,$c1,&c3,$c3,&c4,$c4,&c5,$c5)
n616=}
n617=alias user ci.check | if ($format(user)) $ifmatch | else ud a
n618=alias chops ci.check | if ($format(chops)) $ifmatch | else ud o
n619=alias nops ci.check | if ($format(nops)) $ifmatch | else ud a o
n620=alias ci.check {
n621= if ($active !ischan) { iecho You're not in a channel | halt }
n622= if ($__var(ial.,#)) { iecho IAL for # is being updated. | halt }
n623= if ($chan(#).ial == $false) { iecho IAL for # is not updated. Please wait or type /WHO # to update it. | halt }
n624=}
n625=alias ud {
n626= if ($getusers($1,0,$2) == 0) { iecho There are no matching users in # $+ . | halt }
n627= iecho Listing $getusers($1,0,$2) matching users in #
n628= var %i = 1
n629= while ($getusers($1,%i,$2)) {
n630= gd $ifmatch #
n631= inc %i
n632= }
n633= iecho End of user list.
n634=}
n635=alias getusers return $iif($3,$nick(#,$2,$1,$3),$nick(#,$2,$1))
n636=;eof