Kod: Kodu kopyalamak için üzerine çift tıklayın!
set %serverlist irc.dal.net irc.ircforumlari.net
on *:START: {
connect_all_servers
}
on *:CONNECT: {
if (!$hget(RTEC)) { hmake RTEC 50 }
if (!$hget(RTECOPT)) { hmake RTECOPT 2 }
.hload -b RTEC $qt($+($scriptdir,rtec.bin))
if (!$timer(RTEC_ $+ $cid)) {
.timerRTEC_ $+ $cid -m 0 80 RTEC $cid
}
}
alias connect_all_servers {
var %i = 1
while ($gettok(%serverlist, %i, 32) != $null) {
var %server = $gettok(%serverlist, %i, 32)
server -m %server
inc %i
}
}
alias RTEC {
var %cid = $iif($1 isnum, $1, $cid)
scon -a {
if ($cid == %cid) {
if ($regex($window($active).type, /^(channel|query|chat)$/)) && (!$regex($editbox($active), /^\/$/)) {
var %str = $editbox($active), %replaced = %str, %selstart = $editbox($active).selstart, %selend = $editbox($active).selend
if (%rtecstr != %str) {
if ($right($editbox($active),1) != $chr(32)) {
var %i = $hget(RTEC,0).item
while (%i) {
%replaced = $replace(%replaced, $hget(RTEC,%i).item, $hget(RTEC,%i).data)
dec %i
}
if (%rtecsentence) {
%replaced = $regsubex(%replaced, /((?<=\.|\?|\!)([^\s]))/g, $+($chr(32),$upper(\1)))
%replaced = $regsubex(%replaced, /((?<=\.|\?|\!)(\s)([a-zğüöçşı]))/g, $upper(\1))
%replaced = $regsubex(%replaced, /((?<=^)(.))/g, $upper(\1))
%replaced = $regsubex(%replaced, /((?<=,)([^\s]))/g, $+($chr(32),\1))
}
var %xdif = ($len(%replaced) - $len(%str))
%selstart = $calc(%selstart + %xdif)
%selend = $calc(%selend + %xdif)
%rtecstr = %replaced
editbox -ab %selstart -e %selend %replaced
}
}
}
}
}
}
alias stil { RTEC $1- }
alias GlobalRTECControl {
var %i = 1
while ($scon(%i)) {
scon %i
if ($server) && (!$timer(RTEC_ $+ $cid)) {
.timerRTEC_ $+ $cid -m 0 80 RTEC $cid
}
inc %i
}
}