Xtreme Script Auto-Join — File Browser
XtremeScriptAuto-Joinv1.0 / XtremeScriptAuto-Joinv1.0 / autoj.mrc
autoj.mrc — 6.4 KB — Download this file
; Xtreme Script - The BEST mIRC Script .. Hmm :)
; Copyright (C) 2000, Kuwait Technological Intelligence Organization - cyberock
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;
; For any Queries or Questions Please contact me at Webmaster@Q8power.org
; The full Documentation of the LISENCE is in a file named gpl.txt please read it.
;===============================================================================================
;
; Auto Join Script & Dialog
;
;===============================================================================================
alias cf8 {
if %autoj.cancel == ok { .timerjdal off | .timerjef off | echo -es 12* Autojoin: Manually canceled Autojoin. | unset %autoj.cancel | halt }
dialog -m autoj autoj
}
dialog autoj {
Title "Auto Join Dialog for Efnet and Dalnet"
Size -1 -1 350 220
option pixles
check "",2, 10 10 15 15
Link "Enabled", 3, 30 10 40 15
combo 4, 35 50 105 130
combo 5, 205 50 105 130
Text "Efnet Channels:", 6, 10 35 130 15
Text "DalNet Channels:",7, 180 35 130 15
Link "+", 8, 145 55 15 15
Link "--", 9, 145 70 15 15
Link "+", 10, 315 55 15 15
Link "--", 11, 315 70 15 15
Edit "", 12, 180 10 50 20, right
Text "(s): Custom join timer.", 13, 230 15 110 15
Button "Join!", 14, 143 90 35 75
Button "Join!", 15, 313 90 35 75
list 16, 10 55 20 130
list 17, 180 55 20 130
Button "Ok", 700, 120 180 70 30, ok
Button "Cancel", 800, 195 180 70 30, Cancel
Button "Apply", 900, 270 180 70 30, disable
Button "Help", 18, 10 180 70 30
}
on *:Dialog:autoj:init:0:{
if %autoj == on { did -c autoj 2 }
did -r autoj 12
did -a autoj 12 %autoj.timer
; -- The following lines have been removed because they seem to confuse the user ;) --
; var %c
; %c = 1
; while %c <= $numtok(%autoj.Efnet1,32) {
; did -a autoj 4 $gettok(%autoj.Efnet1,%c,32)
; inc %c
; }
; var %c
; %c = 1
; while %c <= $numtok(%autoj.DalNet1,32) {
; did -a autoj 5 $gettok(%autoj.DalNet1,%c,32)
; inc %c
; }
var %c
%c = 1
while %c <= 8 {
did -a autoj 16 %c
inc %c
}
var %c
%c = 1
while %c <= 8 {
did -a autoj 17 %c
inc %c
}
}
on *:Dialog:autoj:sclick:2:{ did -e autoj 900 }
on *:Dialog:autoj:sclick:3:{ if $did(2).state == 1 { did -u autoj 2 | did -e autoj 900 } | else { did -c autoj 2 | did -e autoj 900 } }
on *:Dialog:autoj:edit:12:{ if $did(12) !isnum { did -r autoj 12 } | did -e autoj 900 }
on *:Dialog:autoj:sclick:8:{ if $did(4) != $null && $didwm(4,$did(4)) == 0 { if $left($did(4),1) != $chr(35) { did -a autoj 4 $chr(35) $+ $did(4) } | else { did -a autoj 4 $did(4) } | did -e autoj 900 } }
on *:Dialog:autoj:sclick:9:{ if $did(4).sel { did -d autoj 4 $did(4).sel | did -e autoj 900 } }
on *:Dialog:autoj:sclick:10:{ if $did(5) != $null && $didwm(5,$did(5)) == 0 { if $left($did(5),1) != $chr(35) { did -a autoj 5 $chr(35) $+ $did(5) } | else { did -a autoj 5 $did(5) } | did -e autoj 900 } }
on *:Dialog:autoj:sclick:11:{ if $did(5).sel { did -d autoj 5 $did(5).sel | did -e autoj 900 } }
on *:Dialog:autoj:sclick:14:{ if $network != DALnet { auto.join.ef } }
on *:Dialog:autoj:sclick:15:{ if $network == DALnet { auto.join.dal } }
on *:Dialog:autoj:sclick:16:{
set %autoj.Efnet.sel $did(16).sel
did -r autoj 4
var %c
%c = 1
while %c <= $numtok(%autoj.Efnet [ $+ [ %autoj.Efnet.sel ] ] ,32) {
did -a autoj 4 $gettok(%autoj.Efnet [ $+ [ %autoj.Efnet.sel ] ] ,%c,32)
inc %c
}
}
on *:Dialog:autoj:sclick:17:{
set %autoj.DalNet.sel $did(17).sel
did -r autoj 5
var %c
%c = 1
while %c <= $numtok(%autoj.DalNet [ $+ [ %autoj.DalNet.sel ] ] ,32) {
did -a autoj 5 $gettok(%autoj.DalNet [ $+ [ %autoj.DalNet.sel ] ] ,%c,32)
inc %c
}
}
on *:Dialog:autoj:sclick:18:{
linesep -s
echo -s If you seem to have problems removing or adding some channels, double check
echo -s that you have selected the group number from the listbox.
linesep -s
echo -s Note: To chose the list of channels you would like to join,
echo -s select the group number then click "Ok".
linesep -s
}
on *:Dialog:autoj:sclick:700,900:{
if $did(12) == $null { did -f autoj 12 | halt }
if $did(2).state == 1 { set %autoj on }
else { unset %autoj }
if $did(12) != $null { set %autoj.timer $did(12) }
var %c
%c = 1
unset %autoj.EfNet $+ $did(16).sel
while $did(4,%c) != $null {
set %autoj.Efnet [ $+ [ $did(16).sel ] ] $addtok(%autoj.Efnet [ $+ [ $did(16).sel ] ] ,$did(4,%c),32)
inc %c
}
%c = 1
unset %autoj.DalNet $+ $did(17).sel
while $did(5,%c) != $null {
set %autoj.DalNet [ $+ [ $did(17).sel ] ] $addtok(%autoj.DalNet [ $+ [ $did(17).sel ] ] ,$did(5,%c),32)
inc %c
}
if $did == 900 { did -b autoj 900 }
}
on *:Connect:{
if %autoj {
if $network == DALnet {
echo -es 12* Autojoin: Joining DALnet Channels (List %autoj.DalNet.sel $+ ) in %autoj.timer seconds. Press crtl+f8 to cancel.
set %autoj.cancel ok
.timerjdal 1 %autoj.timer auto.join.dal
}
else {
echo -es 12* Autojoin: Joining EfNet Channels (List %autoj.EfNet.sel $+ ) in %autoj.timer seconds. Press ctrl+f8 to cancel.
set %autoj.cancel ok
.timerjef 1 %autoj.timer auto.join.ef
}
}
}
alias -l auto.join.dal {
var %c
unset %autoj.cancel
%c = 1
while %c <= $numtok(%autoj.DalNet [ $+ [ %autoj.DalNet.sel ] ] ,32) {
join -n $gettok(%autoj.DalNet [ $+ [ %autoj.DalNet.sel ] ] ,%c,32)
inc %c
}
}
alias -l auto.join.ef {
var %c
unset %autoj.cancel
%c = 1
while %c <= $numtok(%autoj.Efnet [ $+ [ %autoj.Efnet.sel ] ] ,32) {
join -n $gettok(%autoj.Efnet [ $+ [ %autoj.Efnet.sel ] ] ,%c,32)
inc %c
}
}