master_zwerg commented on a mIRC Script, Channel Limiter (Bot Version) v1.2  -  May 12, 2010

very Good Script. but i will intern set limit on Dialog . 1) #Chan 2) limitzahl 15 user +5 ) 3) update Time i post this script with Dialog.

alias -l chl.dlg { dialog -m chlimit chlimit }
alias -l chl.dlg2 { dialog -m chadd chadd }
alias -l chl.del {
var %c = $hget(chltbl,$did(2).sel).item
if (%chl.emode == on) { var %m = on | set %chl.emode off }
if ($me isop %c) { mode %c -l }
hdel chltbl %c
if (%m == on) { set %chl.emode on }
chl.load
}

alias -l chl.load {
var %x = 1
did -r chlimit 2
while ($hget(chltbl,%x).item != $null) {
var %y = $hget(chltbl,%x).item
did -a chlimit 2 %y
inc %x
}
}

dialog chlimit {
title "Channel Limiter"
size -1 -1 177 98
option dbu
list 2, 3 11 130 59, size vsbar
button "Ok", 6, 74 85 35 11, ok
check "Force channel limit when set -l?", 3, 3 71 86 10
button "Add", 4, 139 11 35 11
button "Edit", 5, 139 28 35 11
button "Delete", 7, 139 45 35 11
text "Channels", 1, 3 2 25 8
}

on :dialog:chlimit:sclick::{
if ($did == 3) {
if ($did(3).state == 0) { set %chl.emode off }
if ($did(3).state == 1) { set %chl.emode on }
}
if ($did == 4) { chl.dlg2 }
if ($did == 5) {
chl.dlg2
did -a chadd 8 $hget(chltbl,$did(2).sel).item
did -a chadd 10 $hget(chltbl,$did(2).sel)
}
if ($did == 7) { chl.del }
}

on :dialog:chlimit:init::{
if (%chl.emode == on) { did -c $dname 3 }
chl.load
}

dialog chadd {
title "Channel Limiter"
size -1 -1 137 46
option dbu
text "Channel:", 7, 3 5 25 8
edit "", 8, 29 4 105 10
text "Limit (users above actual user count):", 9, 3 18 92 8
edit "", 10, 96 17 38 10
button "Add", 3, 55 33 35 11
button "Button", 1, 95 33 37 12, hide ok
}

on *:dialog:chadd:sclick:3:{
if ($did(8) != $null) && ($did(10) != $null) {
if ($left($did(8),1) != $chr(35)) {
var %x = $chr(35) $+ $did(8),%y = $did(10)
hadd chltbl %x $did(10)
}
if ($left($did(8),1) == $chr(35)) {
var %x = $did(8),%y = $did(10)
hadd chltbl %x $did(10)
}
if ($me isop %x) {
var %a = $nick(%x,0)
mode %x +l $calc(%a + %y)
}
dialog -x chadd chadd
chl.load
}
}

menu menubar,channel {
Channel limiter
.Setup:{ chl.dlg }
.Help:{ run $+(",$scriptdirchanlimit-help.txt,") }
.-
.Unload:{ if ($input(Are you sure you want to unload this script?,136,Unload Confirmation)) .unload -rs $+(",$script,") }
}

on @*:join:#:{
var %x = 0
while ($hget(chltbl,%x).item != $null) {
var %a = $hget(chltbl,%x).item
if ($chan == %a) {
var %y = $nick(#,0),%z = $hget(chltbl,$chan)
.timer 1 90 mode $chan +l $calc(%y + %z)
halt
}
inc %x
}
}

on @!*:part:#:{
var %x = 0
while ($hget(chltbl,%x).item != $null) {
var %a = $hget(chltbl,%x).item
if ($chan == %a) {
var %y = $nick(#,0),%z = $hget(chltbl,$chan)
.timer 1 10 mode $chan +l $calc((%y + %z)-1)
halt
}
inc %x
}
}

on @*:kick:#:{
if ($knick == $me) { halt }
var %x = 0
while ($hget(chltbl,%x).item != $null) {
var %a = $hget(chltbl,%x).item
if ($chan == %a) {
var %y = $nick(#,0),%z = $hget(chltbl,$chan)
.timer 1 10 mode $chan +l $calc((%y + %z)-1)
halt
}
inc %x
}
}

on @*:quit:{
var %x = 1
while ($comchan($nick,%x) != $null) {
var %a = $hget(chltbl,%x).item,%b = $comchan($nick,%x)
if (%b == %a) {
var %y = $nick(%a,0),%z = $hget(chltbl,%a)
.timer 1 10 mode %a +l $calc((%y + %z)-1)
halt
}
inc %x
}
}

on @*:mode:#:{
if (%chl.emode == on) {
if ($1- == -l) {
var %x = 0
while ($hget(chltbl,%x).item != $null) {
var %a = $hget(chltbl,%x).item
if ($chan == %a) {
var %y = $nick(#,0),%z = $hget(chltbl,$chan)
.timer 1 1 mode $chan +l $calc(%y + %z)
halt
}
inc %x
}
}
}
}

on *:load:{
if ($version >= 6.15) {
set %chl.emode off
chl.dlg
}
else { echo -a 2Sorry, this addon requires mIRC 6.15. Please download the latest version from www.mirc.com
.unload -rs $+(",$script,")
}
}

on *:unload:{
unset %chl.emode
if ($hget(chltbl) != $null) { hfree chltbl }
echo -a 2Channel Limiter successfully unloaded.
}

on :exit:{ hsave -o chltbl $+(",$scriptdirchanlimit.dat,") }
on
:start:{ hmake chltbl 50
if ($isfile($+(",$scriptdirchanlimit.dat,"))) { hload chltbl $+(",$scriptdirchanlimit.dat,") }
}

this "addon" make ONLY +1 on Timer its not so Good

sorry for my English .. i'm German :D

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.