Noticias:

Mata al pato \_O< en el canal #Traffic-Games

Menú Principal

Auto Join

Iniciado por TerraChat, Ago 26, 2024, 09:32 PM

Tema anterior - Siguiente tema

TerraChat

alias addaj {
set %aj.add $1
dec %aj.add
set %aj.type $2
set %aj.addit $did(Autojoin,$1).text
if (%aj.addit != $null) {
set %aj.mksr $read -w* $+ %aj.addit AJ\aj-serv.ini
if ((($ini(AJ\aj-serv.ini,%aj.addit) == $null) || ($ini(AJ\aj-serv.ini,%aj.addit) == 0)) && (%aj.mksr == $null)) {
if ($1 == 23) { writeini -n AJ\aj-serv.ini %aj.addit %aj.type %aj.addit }
else { set %aj.addnet $did(Autojoin,22,$did(Autojoin,22).sel).text | checkaj | writeini -n AJ\aj-serv.ini %aj.addnet %aj.type %aj.addit }
did -a Autojoin %aj.add %aj.addit
}
}
did -r Autojoin $1
}
alias ajk3 {
inc %aj.ncnt
set %aj.kind3 %aj.kind2 $+ %aj.ncnt
set %aj.num $readini -n AJ\aj-serv.ini %aj.remit %aj.kind3
}
alias ajoptions {
if ($dialog(Autojoin) != Autojoin) { dialog -mrd Autojoin Autojoin }
else { echo ␃15[␃0␂P␂erra␂X␂␃15] Autojoin Dialog Is Already Open }
}
alias ajstats {
set %aj.stuff $readini -n AJ\aj-serv.ini %aj.stats $1
set %aj.scnt 0
if (%aj.stuff == $null) { did -a Autojoin $2 <No $1 $+ 's set> }
while (%aj.stuff != $null) {
did -a Autojoin $2 %aj.stuff
inc %aj.scnt
set %aj.get $1 $+ %aj.scnt
set %aj.stuff $readini -n AJ\aj-serv.ini %aj.stats %aj.get
}
}
alias ajsvrs {
set %aj.find $read -w[* AJ\aj-serv.ini
did -r Autojoin 22
while (%aj.find != $null) {
set %aj.line $readn
inc %aj.line
%aj.find = $rembrack(%aj.find)
did -a Autojoin 22 %aj.find
set %aj.find $read -l $+ %aj.line -w[* AJ\aj-serv.ini
}
}
alias ajtype {
if (%aj.kind == 24) {
set %aj.kind2 net
}
if (%aj.kind == 29) {
set %aj.kind2 server
}
if (%aj.kind == 34) {
set %aj.kind2 channel
}
dec %aj.kind
}
alias aj-num {
set %aj.num $readini -n AJ\aj-serv.ini %aj.remit %aj.kind2
set %aj.ncnt 0
while (%aj.remer != %aj.num) {
ajk3
}
if (%aj.ncnt == 0) { set %aj.kind3 %aj.kind2 }
set %aj.ncnt2 %aj.ncnt
remini AJ\aj-serv.ini %aj.remit %aj.kind3
remajfix
}
alias autojoin {
if ($dialog(Autojoin) != Autojoin) { dialog -dmr Autojoin Autojoin }
}
alias checkaj {
set %aj.check $readini -n AJ\aj-serv.ini %aj.addnet %aj.type
set %aj.cnt 0
if (%aj.check == $null) { did -r Autojoin %aj.add }
while (%aj.check != $null) {
inc %aj.cnt
set %aj.type2 %aj.type $+ %aj.cnt
set %aj.check $readini -n AJ\aj-serv.ini %aj.addnet %aj.type2
}
if (%aj.type2 != $null) { set %aj.type %aj.type2 }
}
alias clearaj {
unset %aj.*
}
alias getnet {
set %aj.count 1
set %aj.read $read -nl $+ %aj.count AJ\aj-serv.ini
while (%aj.count <= $lines(AJ\aj-serv.ini)) {
if (($chr(93) isin %aj.read) && ($chr(91) isin %aj.read)) {
set %aj.read $remove(%aj.read,$chr(91),$chr(93))
if ($getsrv == 1) { set %aj.net %aj.read | return 1 }
}
inc %aj.count 1
set %aj.read $read -nl $+ %aj.count AJ\aj-serv.ini
}
}
alias getsrv {
set %aj.count2 0
set %aj.read2 $readini -n AJ\aj-serv.ini %aj.read server
while (%aj.read2 != $null) {
if (%aj.read2 == $server) { return 1 }
inc %aj.count2
set %aj.bs server $+ %aj.count2
set %aj.read2 $readini -n AJ\aj-serv.ini %aj.read %aj.bs
}
}
alias jnc {
if ($getnet == 1) {
set %aj.read 0
set %aj.ini $readini -n AJ\aj-serv.ini %aj.net channel
while (%aj.ini != $null) {
.join %aj.ini
inc %aj.read
set %aj.readin channel $+ %aj.read
set %aj.ini $readini -n AJ\aj-serv.ini %aj.net %aj.readin
}
unset %aj.ini %aj.r*
}
}
alias remaj {
set %aj.remit $did(Autojoin,22,$did(Autojoin,22).sel).text
if (%aj.kind2 == $null) {
remini AJ\aj-serv.ini %aj.remit
did -d Autojoin 22 $did(Autojoin,22).sel
did -c Autojoin 22 1
serverstats
}
else {
set %aj.remer $did(Autojoin,$1,$did(Autojoin,$1).sel).text
aj-num
serverstats
}
}
alias remajfix {
ajk3
while (%aj.num != $null) {
ajk3
}
dec %aj.ncnt
if (%aj.ncnt2 == 0) { set %aj.kind3 %aj.kind2 $+ %aj.ncnt }
else { set %aj.kind3 %aj.kind2 $+ %aj.ncnt }
set %aj.num $readini -n AJ\aj-serv.ini %aj.remit %aj.kind3
remini AJ\aj-serv.ini %aj.remit %aj.kind3
if (%aj.ncnt2 != 0) { set %aj.ncnt %aj.ncnt2 | set %aj.kind3 %aj.kind2 $+ %aj.ncnt }
else { set %aj.kind3 %aj.kind2 }
if (%aj.num != $null) { writeini -n AJ\aj-serv.ini %aj.remit %aj.kind3 %aj.num }
}
alias rembrack {
return $remove($1,$chr(91), $chr(93))
}
alias remtype {
if (%aj.kind == 30) {
set %aj.kind2 server
}
if (%aj.kind == 35) {
set %aj.kind2 channel
}
dec %aj.kind 3
}
alias serverstats {
did -r Autojoin 27
did -r Autojoin 32
set %aj.stats $did(Autojoin,22,$did(Autojoin,22).sel).text
ajstats server 27
ajstats channel 32
}
dialog Autojoin {
title "Autojoin Opciones"
size -1 -1 505 415
text "Categoria:",1, 7 7 100 13
combo 2, 5 23 101 55,drop sort
radio "On", 69, 110 23 35 20
radio "Off", 70, 150 23 35 20
box "Red", 21, 7 48 150 250
list 22, 11 64 142 245, autovs sort group
edit "", 23, 7 303 76 23, autohs
button "Add Red", 24, 88 305 70 20, default
button "Remover seleccionado", 25, 24 330 120 25
box "Seleccione Servidor", 26, 177 48 150 250
list 27, 181 64 142 245, autovs sort group
edit "", 28, 177 303 76 23, autohs
button "Add server", 29, 258 305 70 20, default
button "Remover seleccionado", 30, 194 330 120 25
box "Canal seleccionado", 31, 347 48 150 250
list 32, 351 64 142 245, autovs sort group
edit "", 33, 347 303 76 23, autohs
button "Add canal", 34, 428 305 70 20, default
button "Remover seleccionado", 35, 364 330 120 25
button "Actualizar y salvar", 36, 150 375 200 25, OK
}
menu * {
-
Autojoin
.Autojoin
..On:{
set %autojoin 1
echo -a $timestamp ␃0[␂P␂erra␂X␂] ␃10Autojoin ␃0␂A␂ctivado
}
..Off:{
set %autojoin 0
echo -a $timestamp ␃0[␂P␂erra␂X␂] ␃10Autojoin ␃0␂D␂esactivado
}
..-
..Entrar en los canales:{
echo -a $timestamp ␃0[␂P␂erra␂X␂] ␃10Entrando en los canales...
jnc
}
.-
.Opciones:ajoptions
-
}
on 1:CONNECT:{
if (%autojoin == 1) { jnc | clearaj }
}
on *:DIALOG:Autojoin:INIT:0:{
did -a Autojoin 2 AutoJoin
if (%options.goto == $null) { set -u %options.goto $did(Autojoin,2,1) | did -c Autojoin 2 1 }
if (%autojoin == 1) { did -c Autojoin 69 | did -u Autojoin 70 }
if (%autojoin != 1) { did -u Autojoin 69 | did -c Autojoin 70 }
ajsvrs
did -c Autojoin 22 1
serverstats
}
on *:DIALOG:Autojoin:sclick:*:{
set %aj.kind $did
if ((%aj.kind == 24) || (%aj.kind == 29) || (%aj.kind == 34)) {
ajtype
addaj %aj.kind %aj.kind2
}
if ((%aj.kind == 25) || (%aj.kind == 30) || (%aj.kind == 35)) {
remtype
remaj %aj.kind %aj.kind2
}
if (%aj.kind == 22) { serverstats }
if (%aj.kind == 69) { set %autojoin 1 }
if (%aj.kind == 70) { set %autojoin 0 }
clearaj
}
on 1:DIALOG:Autojoin:dclick:27:{
var %aj.connecto $did(Autojoin,27,$did(27).sel).text
server %aj.connecto
}

alias clones {
var %i,%address,%chan = #$1,%t0 = $ticks
if (%chan == $null) %chan = $active
if (%chan !ischan) { echo $colour(info) -at ␃10[␃11Sintaxis␃10]: ␃15/clones ␃10[canal] | return }
if ($chan(%chan).ial != $true) {
if ($show) echo -a $colour(info) -at ␂P␂erra␂X␂
.ial on
%clones.who = $addtok(%clones.who,%chan,32)
if ($chan(%chan).ial == $false) .who #
return
}
window -c @~clones
window -lhs @~clones
linesep $active
echo $colour(info) -at ␃10[␃11Scaneando Clones␃10]␃15 en:␃10 %chan
%i = $nick(%chan,0)
while (%i) {
aline @~clones $address($nick(%chan,$ifmatch),2) $nick(%chan,$ifmatch) $ifmatch
dec %i
}
%i = 2
%clones.total = 0
%address = $gettok($line(@~clones,1),1,32)
unset %clones.nicks
while ($line(@~clones,%i)) {
if ($gettok($line(@~clones,%i),1,32) == %address) clones.addclone %chan %i
else {
if (%clones.nicks) { echo $colour(info) -at ␃11 $+ $gettok(%clones.nicks,0,32) de %address $+ : %clones.nicks | unset %clones.nicks }
set %address $gettok($line(@~clones,%i),1,32)
}
inc %i
}
if (%clones.nicks) { if ($show) echo $colour(info) -at $gettok(%clones.nicks,0,32) de %address $+ : %clones.nicks }
echo $colour(info) -at $timestamp ␃11 $+ $iif(%clones.total,%clones.total,No) ␃15clones encontrados en␃10 %chan en ␃15 $calc(($ticks - %t0) / 1000) segundos | .echo -at ␃10␂P␂erra␂X␂
unset %clones.nicks %clones.total
window -c @~clones
linesep $active
}
alias -l clones.addclone {
if (%clones.nicks == $null) {
set %clones.nicks $gettok($line(@~clones,$calc($2 - 1)),2,32)
if (%clones.total) sline -a $1 $gettok($line(@~clones,$calc($2 - 1)),3,32)
else sline -s $1 $gettok($line(@~clones,$calc($2 - 1)),3,32)
inc %clones.total
}
%clones.nicks = %clones.nicks $+ , $gettok($line(@~clones,$2),2,32)
sline -a $1 $gettok($line(@~clones,$2),3,32)
inc %clones.total
}
raw 352:* {
if ($istok(%clones.who,$2,32)) halt
}
raw 315:* {
if ($istok(%clones.who,$2,32)) {
%clones.who = $remtok(%clones.who,$2,1,32)
if (%clones.who == $null) unset %clones.who
if ($2 ischan) .clones $2
halt
}
}
on *:connect {
unset %clones.who
wm