aIRC — File Browser
aIRCv0.8.69 / aIRCv0.8.69 / script / alias1.mrc
alias1.mrc — 21.23 KB — Download this file
;/**********************************************************************
; *
; * aIRC
; * Aliases
; *
; **********************************************************************/
;
;;
;
; -( B )-
;
;;
_crlf2msgcrlf {
var %t = $crlf $+ $1 $2 :
return $replace($3-,$crlf,%t)
}
_crlf2ctcpcrlf {
var %t = $+ $crlf $+ $1 $2 :
return $replace($3-,$crlf,%t)
}
_qprivmsg { .quote PRIVMSG $1 : $+ $_crlf2msgcrlf(PRIVMSG,$1,$2-) }
_qnotice { .quote NOTICE $1 : $+ $_crlf2msgcrlf(NOTICE,$1,$2-) }
_qctcp { .quote PRIVMSG $1 : $+ $2- $+ }
_qaction { .quote PRIVMSG $1 :ACTION $2- $+ }
_qctcpreply { .quote NOTICE $1 : $+ $_crlf2ctcpcrlf(NOTICE,$1,$2-) $+ }
_donothing { return }
_dummy { return $1- }
_run { $1- }
_runr {
$1-
return $result
}
_setvar { set % $+ $1- }
_setmpvar { set -u % $+ $1- }
wii {
var %nick = $_parameter($iif($1- != $null,$1-,$_activequery),1,Whois++ [/wii],isvalidircnick,$null,Nick to whois:)
whois %nick %nick
}
rnick { _tnick.set $iif($_isint($1),$1,0) $_randstring(8,lu) }
j { join $1- }
p { part $1- }
;;; huh, /n is used for /names in bitchx, maybe i'll add an option here...
n { nick $1- }
;;; huh, /m is used for /msg in bitchx, maybe i'll add an option here...
m { mode $1- }
q { query $1- }
t { topic $1- }
sc { names $1- }
nws { mode $me -sw }
w { who $1- }
wi { whois $1- }
ws { mode $me +sw }
ww { whowas $1- }
dban { unban $1- }
ub { unban $1- }
send { dcc send $1- }
chat { dcc chat $1- }
k { kick $1- }
i { invite $1- }
b { ban $1- }
d { describe $1- }
l { part $1- }
brb { away brb }
bye { quit $1- }
signoff { quit $1- }
leave { part $1- }
ping {
if ($_disconnected) { return }
ctcp $_parameter($iif($1- != $null,$1-,$_active),1,CTCP Ping [/ping],replace 32 44,$null,CTCP Ping <nicks|#channels>:<CRLF>[separated by commas]) ping
}
ver {
if ($isid) { return $_vers }
if ($_disconnected) { return }
ctcp $_parameter($iif($1- != $null,$1-,$_active),1,CTCP Version [/version],replace 32 44,$null,CTCP Version <nicks|#channels>:<CRLF>[separated by commas]) version
}
version {
if ($_disconnected) { return }
version $1-
}
xlist {
if ($_disconnected) { return }
ctcp $_parameter($iif($1- != $null,$1-,$_active),1,CTCP XDCC list [/xlist],replace 32 44,$null,CTCP XDCC list <nicks|#channels>:<CRLF>[separated by commas]) xdcc list
}
xget {
if ($_disconnected) { return }
var %target,%pack
if ($1 isnum) { tokenize 32 $null $1- }
%target = $_parameter($iif($1 != $null,$1,$_active),1,CTCP XDCC get [/xget],replace 32 44,$null,CTCP XDCC list <nicks|#channels>:<CRLF>[separated by commas])
%pack = $_parameter($2-,1,CTCP XDCC get [/xget],normal,#1,Pack to request from [ %target ] :)
if (%pack isnum) { %pack = $chr(35) $+ %pack }
ctcp %target xdcc send %pack
}
_ircnick2defnick {
if ($_connected) && ($_mini(mirc,nick) != $null) { nick $ifmatch }
}
; /reconnect [<reason>]
reconnect {
if ($_disconnected) { return }
var %server = $_server $port
quit $1-
server %server
}
ascii {
var %m = $mircdir $+ etc\ascii\*.txt
if ($1- == $null) { tokenize 32 $$dir="¿ASCII File?" %m }
else {
if ($1- == $nopath($1-)) { tokenize 32 etc\ascii\ $+ $$1- }
if (. !isin $1-) { tokenize 32 $1- $+ .txt }
}
if ($isfile($1-)) { play " $+ $1- $+ " 1000 }
else { error.s File not found: $^'($1-) }
}
;;
;
; -( Mass )-
;
;;
minvite {
if ($_disconnected) { return }
if (# == $null) {
error.a /minvite must be used in a channel
return
}
var %fc,%i = 1,%c = $_parameter($1,1,Mass invite [/minvite],ischan,$null,Mass Invite to channel:),%t = $iif($_ischan($1),$2,$1)
if (%t == op) {
while ($opnick(#,%i) != $null) {
if ($ifmatch != $me) {
_putserv $ifmatch & invite $ifmatch %c
inc %fc
}
inc %i
}
}
elseif (%t == nop) {
while ($nopnick(#,%i) != $null) {
if ($ifmatch != $me) {
_putserv $ifmatch & invite $ifmatch %c
inc %fc
}
inc %i
}
}
else {
while ($nick(#,%i) != $null) {
if ($ifmatch != $me) {
_putserv $ifmatch & invite $ifmatch %c
inc %fc
}
inc %i
}
}
if ($_not(%fc)) { error.a No users to massinvite from # to %c }
}
;;
;
; -( vers )-
;
;;
_aircicon { return etc\airc.ico }
_verinf { return aIRC[ $+ $_vers $+ ] $+ $_aircweb $+ }
_vert { return aIRC[ $+ $_vers $+ ] }
_aircweb { return http://aircscript.cjb.net/ }
_aircsite { return aircscript.realgamers.net }
_tabomail { return tabo@linuxmail.org }
_aircvernum { return 00086969 }
_vers { return 0.8.69.b69 }
_vernum2ver {
if ($1 != $null) {
var %t
if ($round($mid($1,7,2),0)) { %t = .b $+ $ifmatch }
return $round($mid($1,1,2),0) $+ . $+ $round($mid($1,3,2),0) $+ . $+ $round($mid($1,5,2),0) $+ %t
}
}
sv {
var %ad = $_aircad(+a)
if (=* iswm $active) { say %ad }
elseif ($_connected) && (($active ischan) || ($query($active))) { say %ad }
else { info.a %ad }
}
_aircad {
var %tag,%addons,%ta,%tn
if (a isin $1) && ($_getsetup(script,_addons) != $null) { %addons = addons[ $+ $replace($ifmatch,$chr(32),+) $+ ] }
return mIRC $+ $bits $+ v $+ $version $+ +aIRC $_vers $+ by tabo %addons theme[ $+ $_getcurrtheme $+ ] - $+ $_aircweb
}
_getcurrtheme {
if ($hget(_airctheme,currenthemename) != $null) {
var %tn = $ifmatch,%ta = $hget(_airctheme,author)
if (%ta != $null) && (%ta != tabo) { return %tn by %ta }
return %tn
}
return default
}
_visitaircweb { run $_aircweb }
_visitwebboard { run http://pub9.ezboard.com/faircairc }
_downloadlastairc {
info.a Downloading last version of the script...
run $_aircweb $+ download/airc.rar
}
_listhashtables { var %i = 1,%n = $hget(0) | linesep -s | while (%i <= %n) { info.a %i $hget(%i) | inc %i } }
;;
;
; -( Support )-
;
;;
_remove {
if ($isid) { return }
if ($isfile($1-)) { .remove " $+ $remove($1-,") $+ " }
}
_rmdir {
if ($isid) { return }
var %l
tokenize 32 $_fixdir($remove($replace($iif(*\ iswm $1-,$left($1-,-1),$1-),/,\,\\,\),"))
if ($isdir($1-) == $false) { return }
_dummy $findfile($1-,*,0,_rmdir.remove $1-)
window -hkls @_rmdir
clear @_rmdir
aline @_rmdir $1-
_dummy $finddir($1-,*,0,@_rmdir)
while ($line(@_rmdir,0)) {
%l = $ifmatch
_dummy $findfile($line(@_rmdir,%l),*,0,_rmdir.remove $1-)
.rmdir " $+ $line(@_rmdir,%l) $+ "
dline @_rmdir %l
}
close -@ @_rmdir
}
_rmdir.remove {
.remove " $+ $1- $+ "
}
_ifexistsfiledo {
if ($isfile($gettok($1-,1,124))) {
.timer $+ $_nospaces($gettok($1-,1,124)) off
var %total = $numtok($1-,124),%i = 2
while (%i <= %total) {
_runr $gettok($1-,%i,124)
inc %i
}
}
}
_notepad {
if ($isfile($1-)) { run notepad.exe $shortfn($1-) }
}
_varnull2zero {
if (% [ $+ [ $1 ] ] == $null) { set % $+ $1 0 }
}
_mircfocus {
.timer_mircfocus. $+ $1 off
if ($appactive == $false) {
showmirc -s
.timer_mircfocus. $+ $1 0 $2 _mircfocus $1 $2
}
}
repite { repeat $1- }
repeat {
var %r = $_parameter($1-,1,Repeat [/repeat],normal,$null,Repeat:)
if (%r != $null) {
%r = %r $+
say $str(%r,20)
}
}
_timeremote { .timer -om 1 0 $$1- }
_run2 {
if ($isfile($1-) == $false) {
error.a File not found: $^'($1-)
return
}
if ((*.exe iswm $1-) || (*.com iswm $1-) || (*.reg iswm $1-) || (*.bat iswm $1-) || (*.vbs iswm $1-)) && ($_not($_yesno(0,Run program [/run],0,Run file?<CRLF> [ $+ [ $1- ] ] ))) { return }
run $shortfn($1-)
}
_closequery {
var %i = $query(0),%q
while (%i) {
%q = $query(%i)
if ($1 iswm $_getaddress(%q)) { close -m %q }
dec %i
}
}
_orderemotefiles {
;;; if ($1) || ($nopath($script(1)) != base.mrc) || ($nopath($script($script(0))) != eop.mrc) { _scriptfiles.load -r }
if ($1) || ($nopath($script(1)) != base.mrc) { _scriptfiles.load -r }
}
_maintimer {
var %t,%secs = $asctime(s),%mins
if ($timer(MAINTIMER) == $null) { .timerMAINTIMER -o 0 1 _maintimer }
if ($_connected) && ($_getsetup(lagcheck,state)) {
if (%.lag.current == $null) && (%.lag.sent == $null) { _lag }
var %t = $calc($ctime - %.lag.sent),%lagint1 = $_getsetup(lagcheck,interval),%lagint2 = %lagint1 * 100
if (%t > %lagint1) && (%t < %lagint2) { %.lag.current = %t }
}
else { unset %.lag.current }
if (%_titlebar != $null) { _updatetitlebar }
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This can slow down things... maybe with a Pentium 8
;;; _hook.call secondly
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (15 // %secs) {
_fixstuff
_hook.call 15secondly
if (%secs == 0) {
%mins = $asctime(n)
if ($away) {
if ($round($calc($_awaysecsgone / 60),0)) {
var %awayminsgone = $ifmatch
;;; if (2 // %mins) && (<AWAYGONE> isin $_defmsg(away.whois)) { _quoteaway 0 }
if ($_getsetup(away,refreshr.status)) && ($_getsetup(away,refreshr.time) // %awayminsgone) { _quoteaway 0 }
if ($_getsetup(away,antiidle.status)) && ($_getsetup(away,antiidle.time) // %awayminsgone) { _away.antiidle }
if ($_getsetup(away,reminder.status)) && ($_getsetup(away,reminder.time) // %awayminsgone) { _away.remind }
}
}
elseif (%_away.autot) && ($_connected) && ($idle > $calc(%_away.autot * 60)) { _autoaway }
_dcc.checkminspeed
_hook.call minutely
if (5 // %mins) {
_partyline.logchans
_hook.call 5minutely
%t = 0
if ($_isint($_getsetup(script,save-users-at)) < 60) { %t = $ifmatch }
if (%mins == $calc(%t % 60)) { .timer -mo 1 $rand(1,59999) _stimer.hourly.saveusers }
%t = 0
if ($_isint($_getsetup(script,hourly-updates)) < 60) { %t = $ifmatch }
if (%mins == $calc(%t % 60)) {
_hook.call hourly
.timer -mo 1 $rand(1,59999) _stimer.hourly.updates
}
if ($asctime(H) = 0) { _hook.call daily }
}
}
}
}
_stimer.hourly.saveusers {
%c.partyline.save.nolog = 1
.usave
}
_stimer.hourly.updates { _notes.hourly }
_fixstuff {
_setusrdir
_orderemotefiles
.ctcps on
.events on
.raw on
.dlevel 1
.remote on
.ial on
.ignore on
.auto off
.protect off
_network 0
_away.loadvars
if ($server) { _mOTFv.SetVersion $_aircad(+) }
}
_updatetitlebar {
if (%_titlebar == $null) { return }
var %titlebar = $remove(%_titlebar,<DUMMY>),%result,%nick,%server,%network,%time,%lag,%idle,%online,%pager,%away,%socket,%chan,%script
if ($_not($_connected)) { %titlebar = $remove(%titlebar,<NICK>,<SERVER>,<NETWORK>,<LAG>,<IDLE>,<ONLINE>,<AWAY>,<CHAN>) }
if (<NICK> isin %titlebar) { %nick = - $me }
if (<SERVER> isin %titlebar) { %server = - $server $port }
if (<NETWORK> isin %titlebar) && (%.network != $null) { %network = - %.network }
if (<TIME> isin %titlebar) { %time = - $_shortdate }
if (<LAG> isin %titlebar) && ($_getsetup(lagcheck,state)) { %lag = - Lag[ $+ $iif(%.lag.current,$__lagtime(%.lag.current),?) $+ ] }
if (<IDLE> isin %titlebar) { %idle = - Idle[ $+ $_miniduration($idle) $+ ] }
if (<ONLINE> isin %titlebar) { %online = - Online[ $+ $_miniduration($online) $+ ] }
if (<PAGER> isin %titlebar) {
if (%.pager.status) { %pager = - Pager[ $+ %.pager.new $+ / $+ %.pager.all $+ ] }
else { %pager = - Pager[off] }
}
if (<AWAY> isin %titlebar) && ($away) { %away = - Away $_miniduration($calc($ctime - %c.away.time)) [[ $+ $strip(%c.away.reason) $+ ]] }
if (<SOCKET> isin %titlebar) { %socket = - Sockets[ $+ $sock(*,0) $+ ] }
if (<CHAN> isin %titlebar) && ($active ischan) { %chan = - [[ $+ $active $nick($active,0) - $nick($active,0,o) $+ o $nick($active,0,v,o) $+ v $nick($active,0,r) $+ r $+ ]] }
if (<SCRIPT> isin %titlebar) { %script = - (aIRC $_vers $+ ) }
titlebar $replace(%titlebar,<NICK>,%nick,<SERVER>,%server,<NETWORK>,%network,<TIME>,%time,<LAG>,%lag,<IDLE>,%idle,<ONLINE>,%online,<PAGER>,%pager,<AWAY>,%away,<SOCKET>,%socket,<CHAN>,%chan,<SCRIPT>,%script)
}
_closematchingwindows {
var %i = 1,%j,%z,%t
while ($window(%i)) {
%t = $ifmatch
%j = 1
%z = 1
while ($gettok($1-,%j,32) != $null) {
if ($ifmatch iswm %t) {
%z = 0
close -@ %t
break
}
inc %j
}
if (%z) { inc %i }
}
}
_closematchingdialogs {
var %i = 1,%j,%z,%t
while ($dialog(%i)) {
%t = $ifmatch
%j = 1
%z = 1
while ($gettok($1-,%j,32) != $null) {
if ($ifmatch iswm %t) {
%z = 0
dialog -x %t
break
}
inc %j
}
if (%z) { inc %i }
}
}
_closematchingtimers {
var %tmp = $1-,%i = $numtok(%tmp,32)
while (%i) {
.timer $+ $gettok(%tmp,%i,32) off
dec %i
}
}
_closematchingsockets {
var %tmp = $1-,%i = $numtok(%tmp,32)
while (%i) {
sockclose $gettok(%tmp,%i,32)
dec %i
}
}
_closesocket {
if ($sock($1)) {
sockclose $1
if ($2 != $null) { lecho.s $2- }
}
}
_loop {
var %i = 1
while ($gettok($1,%i,44) != $null) {
if ($numtok($gettok($1,%i,44),45) == 2) {
var %s = 0
while ($calc($gettok($gettok($1,%i,44),1,45) + %s) <= $gettok($gettok($1,%i,44),2,45)) {
$replace($2-,,$ifmatch)
inc %s
}
}
else { $replace($2-,,$gettok($1,%i,44)) }
inc %i
}
}
_txtloop {
var %i = 1
while ($gettok($1,%i,44) != $null) {
$replace($2-,,$gettok($1,%i,44))
inc %i
}
}
_nikloop {
if ($snick(#,0) == 1) {
$replace($1-,,$snick(#,1))
return
}
var %i = 1
while ($snick(#,%i) != $null) {
$replace($1-,,$ifmatch)
inc %i
}
}
;;
;
; -( Support )-
;
;;
echo2 {
if ($1 !isnum) { tokenize 32 $colour(normal) $1- }
if (-?* iswm $2) && ($mid($2,2,1) isin dehitsaql) {
if (a !isin $2) && (s !isin $2) && (d !isin $2) && (($window($3)) || ($query($3))) {
if ($4- == $chr(160)) { linesep $3 }
elseif ($4- != $null) { echo $1- }
}
else {
if ($3- == $chr(160)) { linesep $2 }
elseif ($3- != $null) { echo $1- }
}
}
else {
if ($window($2)) || ($query($2)) {
if ($3- == $chr(160)) { linesep $2 }
elseif ($3- != $null) { echo $1- }
}
else {
if ($2- == $chr(160)) { linesep -a }
elseif ($3- != $null) { echo $1- }
}
}
}
echo.mirc {
if ($2- == $null) { return }
if ($1 == ctcp) {
if ($_minio(4,19)) && (@* !iswm $active) && ($active != status window) { echo2 $colour(ctcp) -at $2- }
else { echo2 $colour(ctcp) -est $2- }
}
}
echo.userhost {
if ($1- == $null) { return }
%:echo = echo.a $colour(info)
^userhost $1-
}
echo.whois {
var %win = @Whois,%open = $window(%win)
if (%open) || ($_getsetup(script,_@whois)) {
if (%open == $null) {
window -k %win $_window.conf(%win)
_window.font.reset %win %win
window -a %win
}
window -g %win
return echo2 $colour(whois) -ti %win
}
if ($_minio(2,26)) && (@* !iswm $active) { return echo2 $colour(whois) -ati }
return echo2 $colour(whois) -sti
}
echo.who {
if (@* iswm $active) { return echo2 $colour(normal) -sti }
return echo2 $colour(normal) -ati
}
echo.rawstatus { return echo2 $colour(info) -sti $1- }
echo.raw { return lechol.s $colour(info) $1- }
echo.a { echo2 $iif($1 isnum,$1) $_actwin(it) $iif($1 isnum,$2-,$1-) }
echo.s { echo2 $iif($1 isnum,$1) -ist $iif($1 isnum,$2-,$1-) }
echo.w { echo2 $iif($1 isnum,$1) $_winwin(it,$iif($1 isnum,$2,$1)) $iif($1 isnum,$3-,$2-) }
lecho.a {
linesep $_actwin
echo2 $iif($1 isnum,$1) $_actwin(it) $iif($1 isnum,$2-,$1-)
}
lecho.s {
linesep -s
echo2 $iif($1 isnum,$1) -ist $iif($1 isnum,$2-,$1-)
}
lecho.w {
linesep $_winwin(it,$iif($1 isnum,$2,$1))
echo2 $iif($1 isnum,$1) $_winwin(it,$iif($1 isnum,$2,$1)) $iif($1 isnum,$3-,$2-)
}
lechol.a { echo2 $iif($1 isnum,$1) $_actwin(eit) $iif($1 isnum,$2-,$1-) }
lechol.s { echo2 $iif($1 isnum,$1) -eist $iif($1 isnum,$2-,$1-) }
lechol.w { echo2 $iif($1 isnum,$1) $_winwin(eit,$iif($1 isnum,$2,$1)) $iif($1 isnum,$3-,$2-) }
error.a {
echo2 $^errcolor $_actwin(eit) $^error($1-)
^playthemesound ERROR
}
error.s {
echo2 $^errcolor -eist $^error($1-)
^playthemesound ERROR
}
error.w {
echo2 $^errcolor $_winwin(eit,$1) $^error($2-)
^playthemesound ERROR
}
error.raw {
%:echo = echo2 $^errcolor -eist
var %alias = ^ $+ $numeric
if ($isalias(%alias)) { %alias $1- }
else { %:echo $^error($2-) }
}
warning { echo2 $^warncolor $_actwin(eit) $^warning($1-) }
info.a { echo2 $colour(info) $_actwin(eit) $^*** $1- }
info.s { echo2 $colour(info) -eist $^*** $1- }
info.w { echo2 $colour(info) $_winwin(-eit,$1) $^*** $2- }
ctcp.a { echo2 $colour(ctcp) $_actwin(eit) $^*** $1- }
ctcp.s { echo2 $colour(ctcp) -eist $^*** $1- }
ctcp.w { echo2 $colour(ctcp) $_winwin(eit,$1) $^*** $2- }
;;
;
; -( Support )-
;
;;
_unset { unset % $+ $1 % $+ $2 % $+ $3 % $+ $4 % $+ $5 % $+ $6 % $+ $7 % $+ $8 % $+ $9 }
;;
;
; /_opcheck #channel
;
_opcheck {
var %chan = $1,%i = $nick(%chan,0),%nick,%fulladdress,%bitch = $_prot.chansetting(cubitchmode,19,1,%chan),%freevoice = $_rchini(freevoice,%chan),%autovoice = $_rchini(autovoice,%chan),%autoop = $_rchini(autoop,%chan),%tmp
if ($chan(%chan).ial != $true) {
if (join* iswm $chan(%chan).status) { .timer 1 3 _opcheck %chan }
return
}
if ($ialchan(*!*@0.0.0.0,%chan,1)) || ($ialchan(*!*@x.x.x.x,%chan,1)) {
error.w %chan There are users with invalid hosts in %chan ( $+ $gettok($ifmatch,2,64) $+ ) - Cancelling 'ON OP' routines...
return
}
if ($_rchini(_scanclones,%chan) == 2) { _clones %chan echo }
while (%i) {
var %nick = $nick(%chan,%i),%fulladdress = $_address(%nick,5)
if (%nick != $me) {
if ($_finduser(%fulladdress) != $null) { %tmp = $_opcheck.user(%chan,%nick,%fulladdress,$ifmatch,%autoop,%autovoice,%freevoice) }
elseif (%bitch) && (%nick isop %chan) { _dummy $_triggered(cubitchmode,%chan,$_nospaces(¶,cubitchmode,!,$_mask(%fulladdress,%_maskclon),%chan),%nick,$gettok(%fulladdress,2,64),$gettok(%fulladdress,2,33),%fulladdress,0,0,0,0,0) }
}
dec %i
}
if ($_rchini(enforcebans,%chan)) { .enforcebans %chan }
}
;
;;
;
; /_opcheck.user #channel nick fulladdress handle autoop autovoice freevoice
;
_opcheck.user {
var %chan = $1,%nick = $2,%fulladdress = $3,%handle = $4,%autoop = $5,%autovoice = $6,%freevoice = $7,%flags = $_nickflags(%handle,%chan),%maskclon = $_mask(%fulladdress,%_maskclon),%isop = 0
if (%nick !ison %chan) || (%nick == $me) { return }
if (%nick isop %chan) { %isop = 1 }
if (%isop) {
if (d isincs %flags) { deop %chan %nick }
if ($_prot.chansetting(cubitchmode,19,1,%chan)) && (o !isincs %flags) { _dummy $_triggered(cubitchmode,%chan,$_nospaces(¶,cubitchmode,!,%maskclon,%chan),%nick,$gettok(%fulladdress,2,64),$gettok(%fulladdress,2,33),%fulladdress,0,0,0,0,0) }
}
elseif (o isincs %flags) && ((a isincs %flags) || (%autoop)) { op %chan %nick }
if (k isincs %flags) { _autokickloser %handle %nick %chan }
elseif (v isincs %flags) && (%nick !isvo %chan) && (%isop == 0) && (%autovoice) { voice %chan %nick }
elseif (%nick isvo %chan) && (q isincs %flags) { devoice %chan %nick }
elseif (q !isincs %flags) && (%nick !isvo %chan) && (%isop == 0) && (%freevoice) { voice %chan %nick }
}
_openwins {
if ($1- != $null) { close -@ $1- }
if ($1) { window -hl $1 }
if ($2) { window -hl $2 }
if ($3) { window -hl $3 }
if ($4) { window -hl $4 }
if ($5) { window -hl $5 }
if ($6) { window -hl $6 }
if ($7) { window -hl $7 }
if ($8) { window -hl $8 }
if ($9) { window -hl $9 }
}
_closewins { close -@ $1- }
_disconnected {
if ($_not($_connected)) {
if ($show) { error.a You are not connected. }
return 1
}
return 0
}
; $_iamnotop4com(channel,command)
_iamnotop4com {
if ($_disconnected) { return 1 }
if ($me !isop $1) {
if ($show) { error.a / $+ $2 $+ : you don't have Ops }
return 1
}
return 0
}
; $_iamnotircop(command)
_iamnotircop {
if ($_disconnected) { return 1 }
if (o !isin $usermode) {
if ($show) { error.a / $+ $1 $+ : you are not an IRC Operator }
return 1
}
return 0
}
_scanial.auto { .timer $+ _IALUPDATE $+ $chan 1 1 _scanial._auto $1 }
_scanial._auto {
var %chan = $1,%ask = 0,%nonono = 0,%total = $nick(%chan,0)
if ($_rchini(_updateial.ask,%chan)) && ($_isint($_rchini(_updateial.asknum,%chan))) { %ask = $ifmatch }
if ($_rchini(_updateial.nonono,%chan)) && ($_isint($_rchini(_updateial.nonononum,%chan))) { %nonono = $ifmatch }
if (%nonono) && (%total > %nonono) { }
elseif (%ask) && (%total > %ask) && ($_not($_yesno(1,IAL Update,0,Update IAL for channel [ %chan ] ? [[ [ $nick(%chan,0) ] users ]] ))) { }
else { _scanial %chan }
}
_scanial {
if ($me ison $1) && ($chan($1).ial == $false) {
%c.reial.c = $addtok(%c.reial.c,$1,32)
.who $1
}
}
_updatebanlist {
if ($me ison $1) && ($chan($1).ibl == $false) && ($istok(%c.rebans.c,$1,32) == $false) {
%c.rebans.c = $addtok(%c.rebans.c,$1,32)
mode $1 +b
}
}
dns {
if ($group(#_airctexthemes) == on) {
.dns $1-
if ($show) { lechol.a $colour(other) $^*** Looking up: $1- }
}
else { dns $1- }
}
_omsg {
if ($me isop $1) && ($2- != $null) { omsg $1- }
}
_onotice {
if ($me isop $1) && ($2- != $null) { onotice $1- }
}