alias a {
var %a = 1
while %a <= $ini($conf(cfile),servers,0) {
%servers = $addtok(%servers,$readini($conf(cfile),servers,$+(n,%a)),32)
inc %a
}
return %servers
unset %servers
}
alias b {
var %s = 1
while %s <= $gettok($conf(server),0,32) {
if $sock($+($conf(me),%s)).status != active {
$iif($sock($+($conf(me),%s)),.sockclose $sock($+($conf(me),%s)))
if !$sock($+($conf(me),%s),1).name {
$+(.timer,_ct,%s) 1 $calc($conf(controthle) + %s) .sockopen $+($conf(me),%s) $replace($gettok($conf(server),%s,32),$chr(58),$chr(32))
}
}
inc %s
}
}
alias c {
sockclose $+(*,$conf(me),*)
var %i = 1
while %i <= $gettok($conf(server),0,32) {
if !$sock($+($conf(me),%i),1).name {
$+(.timer,_ctc,%i) 1 $calc($conf(controthle) + %i) .sockopen $+($conf(me),%i) $replace($gettok($conf(server),%i,32),$chr(58),$chr(32))
}
inc %i
}
.timer_c 0 10 b
}
alias d {
if ($hget(debug,debug) == acik) {
echo *** Debug Closed
hadd -m debug debug kapali
hsave -i debug $conf(cfile)
e -c
return
}
:b
if ($hget(debug,debug) == kapali) {
echo *** Debug Open
hadd -m debug debug acik
hsave -i debug $conf(cfile)
return
}
if !$hget(debug,debug) {
err Debug Config line missing..! Actualy standart debug config making.
hadd -m debug debug acik
hsave -i debug $conf(cfile)
hload -i debug $conf(cfile)
goto b
return
}
if !$1 { hload -i debug $conf(cfile) }
if $1 == -i && $2 && !$3 {
if !$isalias($2) {
err Aliases function not found!, Plaease make first aliases function then use this command!.
}
if $isalias($2) {
hadd -m dalias debugal $2
err *** Debug outputing $2 function.
}
}
}
alias e {
if $hget(debug,debug) == acik {
$iif(!$window($+(@db-,$1)),window -fen $+(@db-,$1),aline $+(@db-,$1) <-- $1- )
$iif($hget(dalias,debugal),$hget(dalias,debugal) $1-)
}
if $1 == -c { close -@ }
}
alias f {
;flush alias
}
alias g {
/*
;+
if $1 == $chr(43) && $3 {
hadd -m $2 $3-
hsave -i $2 $conf(cfile)
hload -i $2 $conf(cfile)
}
;-
if $1 == $chr(45) {
hfree $2 $3-
hsave -i $2 $conf(cfile)
hload -i $2 $conf(cfile)
}
;@
if $1 == $chr(64) { return $hget($2,$3-) }
*/
;<
if $1 == $chr(60) { writeini $cofn(cfile) $1 $2- }
;<
if $1 == $chr(62) { return $readini($cofn(cfile),$1,$2-) }
if !$1 { hload -i c $conf(cfile) | echo *** Config file load }
;/
if $1 == $chr(47) { hadd -m m $2- }
;\
if $1 == $chr(92) { return $hget(m,$2) }
;!
if $1 == $chr(33) { return hfree m }
}
alias l {
;ceza <1=sname> <2=time> <3=ip> <4=reason>
var %show_mode
; echo s $1-
;cr only
if !%show_mode {
var %year = 525941
var %month = 43829
var %week = 10080
var %day = 1440
var %hour = 60
var %min = 1
if $right($3,1) == Y && $left($2,$calc($len($2) -1)) isnum { var %exp $calc($gettok($2,1,$asc(y)) * %year) }
if $right($3,1) == A && $left($2,$calc($len($2) -1)) isnum { var %exp $calc($gettok($2,1,$asc(a)) * %month) }
if $right($3,1) == W && $left($2,$calc($len($2) -1)) isnum { var %exp $calc($gettok($2,1,$asc(w)) * %week) }
if $right($3,1) == D && $left($2,$calc($len($2) -1)) isnum { var %exp $calc($gettok($2,1,$asc(d)) * %day) }
if $right($3,1) == H && $left($2,$calc($len($2) -1)) isnum { var %exp $calc($gettok($2,1,$asc(h)) * %hour }
if $right($3,1) == M && $left($2,$calc($len($2) -1)) isnum { var %exp $calc($gettok($2,1,$asc(m)) * %min) }
if $hget(Sver,Server) == CR {
s $1 KLINE $3 $4- %exp
s $1 AKILL $3 $4- %exp
return
}
if $hget(Sver,Server) == Unreal {
s $1 GZLINE $2-
s $1 GZLINE $2-
return
}
else {
s $1 KLINE $3 0 $4-
}
}
}
alias s {
$iif($window(@db-,$1),echo $+(@db-,$1) ---> $1- )
if $sock($1).status == active { sockwrite -nt $1- }
}
alias err {
echo :: 4,8 DATA $1-
}
alias _ { return $eval($sockname) }
##Event
on *:START: { a | b | d }
ON *:SOCKOPEN:*: {
;echo :: $sockerr
;###System open sock
if $+(*,$conf(me),*) iswm $_ {
var %n $conf(nick)
s $_ PASS $conf(spass)
s $_ NICK %n
g / $_ %n
; ident "domain" "ip" :user
s $_ USER mynet "" " $+ $iif($host,$host,$ip) $+ " :Mynet Sohbet Kullanicisi
;s $_ USER $+($iif(!$gettok($conf(ident),1,$asc(@)),$conf(ident),$gettok($conf(ident),1,$asc(@))),$chr(32),",$iif(!$gettok($conf(ident),2,$asc(@)),$conf(domain),$gettok($conf(ident),2,$asc(@))),",$chr(32),",$iif(!$ip,127.0.0.1,$ip),",$chr(32),$conf(usern))
}
;##proxy sock
if *prx-* iswm $_ {
if ($sockerr) { sockclose $_ | return }
echo : 2 Proxy: $chr(32)4Port: $sock($_).port - $sock($_).ip 4Type: $sock($_).type 4N\A: $portfree($sockerr)
if $sock($_).port isin $conf(conport) {
;normal web
s $_ GET / HTTP/1.1
s $_ Host: $gettok($_,2,$asc(=)) $v2 $+ $str($crlf,2)
s $_ Referer: $+($conf(me),$chr(40),User:,$_,$chr(41))
s $_ User-Agent: Mozilla/4.6 [tr] $+($chr(40),Win,$os,;,$chr(32),I,$chr(41))
;poxy connect
s $_ CONNECT $+(irc.,$conf(domain),:666,$r(0,9)) HTTP/1.0 $str($crlf,2)
s $_ $crlf
;proxy web
s $_ GET $+(
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]) HTTP/1.0 $str($crlf,2)
s $_ $crlf
}
if ($portfree($sockerr)) && $sock($_).port !isin $conf(conport) {
;%D detayli - %S standart
var %D $+($conf(BanReason),~,$gettok($sock($_).ip,1-3,$asc(.)),.,$str(*,$len($gettok($sock($_).ip,-1,46))),:,$sock($_).port)
var %Q $conf(BanReason)
s $gettok($_,1,$asc(~)) privmsg $conf(ajoin) PROXY FOUND!: $_ @ $+(
*@,$sock($_).ip) 1d %D
l $gettok($_,1,$asc(~)) $+(
*@,$sock($_).ip) $conf(sure) %D
.sockclose $+(*,$gettok($_,2,$asc(=)),*)
}
}
}
ON *:SOCKREAD:*: {
var %s
;##system sock
if $+(*,$conf(me),*) iswm $_ {
sockread %s
tokenize 32 %s
;##DEBUG
if $hget(debug,debug) == acik { e $_ $1- }
;echo :sil:debug: $1-
;##PING!PONG?
if $1 == PING { s $_ PONG $2- }
;##RAWs
if $2 isnum {
if $2 == 001 {
; g / $_ $gettok($1-,-1,32)
}
if $2 == 004 {
;server version
if *Unreal?.* iswm $2- { hadd -m Sver Server Unreal | return }
if ConferenceRoom isin $2- { hadd -m Sver Server CR | return }
else { hadd -m Sver Server diger | return }
}
if $2 == 005 {
s $_ OPER $conf(operpass)
s $_ JOIN 0,
.timer 1 2 s $_ privmsg nickserv identify $conf(nickpass)
.timer 1 3 s $_ chghost $_ proxybot.mynet.com
.timer 1 120 s $_ chgname $_ ProxyBOT BETA v2.0 MN Mynet
.timer 1 5 s $_ sajoin $_ $replace($conf(ajoin),$chr(44),$chr(32))
}
if $2 == 302 {
;user host
}
if $2 == 376 || $2 == 422 {
;end motd - motd yok
}
if $2 == 381 {
;now oper
s $_ NICK $_
if $hget(Sver,Server) == CR { var %sj FJOIN | .timer 1 5 s $_ UMODE +fc }
if $hget(Sver,Server) == Unreal {
var %sj SAJOIN $_
.timers 1 5 s $_ $conf(umodes)
}
else { var %sj JOIN }
s $_ %sj $replace($conf(ajoin),$chr(44),$chr(32))
}
if $2 == 491 || $2 == 464 {
;non oper
err $_ $1-
}
if $2 == 433 {
;nick in use
err $2-
}
} ;end raw
;##SCOMMAND
if $2 == NICK {
if $remove($gettok($1,1,$asc(!)),:) == $g(\,$_) {
;bot nick <$me> function
if $remove($3,:) != $g(\,$_) && $+($conf(me),*) !iswm $remove($3,:) {
g / $_ $remove($3,:)
if $_ != $remove($3,:) {
s $_ NICK $_
g / $_ $remove($3,:)
}
$iif($g(\,$_) != $_,$+(.timer,$_) 0 5 s $_ NICK $_)
}
}
; if $remove($3,:) != $g(\,$_) && $+($conf(me),*) == $remove($3,:) { err :no:19 }
else {
;end more
}
} ;#end Scommands
;##SNOTICE BÖLÜMÜ
if *Notice*--*Client*connecting*on*port* iswm $5- {
s $_ privmsg #proxy-found GRS-NICK: $12 GRS-IDENT: $remove($gettok($13,1,64),$chr(40)) GRS-IP: $remove($gettok($13,2,64),$chr(40),$chr(41),$chr(64)) GRS-PORT: $remove($11,:)
var %ip = $remove($gettok($13,2,64),$chr(40),$chr(41),$chr(64))
;server ip noscan - excemp ip'ler
if !$regex($conf(server),(%pi)) && !$regex($conf(excempt),(%pi)) {
var %pi = 1
while (%pi <= $gettok($conf(prxport),0,32)) {
var %ki = $gettok($conf(prxport),%pi,32)
var %pxn = $+($_,~prx-,%ki,=,%ip)
if !$sock(%pxn,1).name {
sockopen %pxn %ip %ki
$+(.timer,%pxn) 1 $conf(timeoutsec) .sockclose %pxn
if $conf(dns) { .dns %ip }
}
inc %pi
}
}
if *Notice*Client*connecting* iswm $5- || *Client?exiting:* iswm $5- {
$iif(!$window(@Giris\Cikis),window -fen @Giris\Cikis,aline @Giris\Cikis $1-)
}
if *changed*his/her*nickname* iswm $1- {
s $_ privmsg #proxy-found NICK-U: $7-
}
} ;#end Snotice
;##PRIVMSG
if :FINGER iswm $4- {
s $_ NOTICE $gettok($gettok($1,1,33),1,58) : $+ $chr(1) $+ FINGER esChat v3.9 © 2009 $+ $chr(1)
}
if :VERSION iswm $4- {
s $_ NOTICE $gettok($gettok($1,1,33),1,58) : $+ $chr(1) $+ VERSION esChat v3.9 © 2009 $+ $chr(1)
} ;#end Privmsg
;##Scanner Sock
if *prx-* iswm $_ {
if $sock($_).port isin $conf(conport) {
sockread %s
if *<?>* iswm %s || *-*:* iswm %s {
echo :REAL-SITE: %s
;real web
; .sockclose $_
return
}
if $regex(%s,.*HTTP\/1\.. 200 .*) {
echo :PROXY-SITE: %s
echo : s $gettok($_,1,$asc(~)) privmsg os akill add +1d $+(
*@,$sock($_).ip) $+($conf(BanReason),~,$left($sock($_).ip,-3),$str(*,$len($gettok($sock($_).ip,-1,46))),:,$sock($_).port )
}
if *<?>* iswm %s && $regex(%s,.*HTTP ERROR: 501 Method+NICK+.*) {
echo :WEB-PROXY-SITE: %s
echo : s $gettok($_,1,$asc(~)) privmsg os akill add +1d $+(
*@,$sock($_).ip) $+($conf(BanReason),~,$left($sock($_).ip,-3),$str(*,$len($gettok($sock($_).ip,-1,46))),:,$sock($_).port )
}
else {
echo :--: %s
echo : s $gettok($_,1,$asc(~)) privmsg os akill add +1d $+(
*@,$sock($_).ip) $+($conf(BanReason),~,$left($sock($_).ip,-3),$str(*,$len($gettok($sock($_).ip,-1,46))),:,$sock($_).port )
; return
}
}
if $sock($_).port !isin $conf(conport) {
sockread %s
}
if $sockerr > 0 { err $sock($_).wserr | return }
echo 4 -s :-> $sock($_).ip $sock($_).port
.sockclose $_
}
}
}
alias tr {
var %prx $ticks
.dns $1
var %ip $1
var %pi = 1
while (%pi <= $gettok($conf(prxport),0,32)) {
var %ki = $gettok($conf(prxport),%pi,32)
var %pxn = $+($2,~prx-,%ki,=,$1)
if !$sock(%pxn,1).name {
sockopen %pxn %ip %ki
$+(.timer,%pxn) 1 $conf(timeoutsec) sockclose %pxn
}
inc %pi
}
}