mIRC Home    About    Download    Register    News    Help

Print Thread
#75028 13/03/04 04:57 AM
Joined: Jan 2003
Posts: 48
O
oSaYaP Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Jan 2003
Posts: 48
How can i create a remote that limit automaticaly a channel
e.g: an alias that autolimit each 10 seconds and automaticaly limit the channel 5 more of users that are on the channel.
eg: if channel has 60 users each 10 seconds remote has to limit to +l 65 and if an user left that channel on 10 seconds it would be +l 64.
Please help me :P


-= Porque pese a todo Dios .. aún te tengo fé =-
#75029 13/03/04 05:18 AM
Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
You could use a time to make it happen every 10 seconds -
/timerautolimit 0 10 /autolimit

where /autolimit runs the alias you write.

/autolimit would contain code to count the number of users, add 5 to that number, and then set the room limit:

/mode #chan +l $calc($nick(#chan,0) + 5)


I hope that helps - I have not tested it.

Cheers,

DK

(p.s. - While I live in Canberra now - I once did live in Darwin!)

Last edited by Darwin_Koala; 13/03/04 05:19 AM.

Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!
#75030 13/03/04 05:21 AM
Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
D'Oh - or you could combine it all into one command! :

/timerautolimit 0 10 /mode #chan +l $calc($nick(#chan,0) + 5)

(change #chan to the channel that you want ot limit)

Cheers,

DK


Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!
#75031 13/03/04 05:36 AM
Joined: Jan 2003
Posts: 48
O
oSaYaP Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Jan 2003
Posts: 48
Yes it works but only at first time
look at:
* X sets mode: +l 108
* FACUSEX has joined #paranachat
* N30 has joined #paranachat
* Active timers:
* Timer autolimit 10s delay /mode #paranachat +l 108 (Network)

It seems like that code "set" -> $calc($nick(#channel,0) + 5)
and then did not autolimit :S


-= Porque pese a todo Dios .. aún te tengo fé =-
#75032 13/03/04 08:04 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Actually you can't - not like that. In that code, the $calc($nick(#chan,0) + 5) will be evaluated when you start the timer, so you'll always be setting the limit to the same number. What you can use is $!calc($nick(#,0) + 5) (note the use of the !)

Furthermore, 10 seconds is not a good time to use - it creates a mode flood in your channel. Once per 2 minutes is more than plenty.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#75033 13/03/04 11:09 AM
Joined: Jan 2003
Posts: 48
O
oSaYaP Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Jan 2003
Posts: 48
Thanks a lot laugh
That´s working on aliases:
/autolimitar /timerautolimit 0 30 /autolimit
/autolimit /mode #paranachat +l $calc($nick(#paranachat,0) + 7)

Thanks all smile


-= Porque pese a todo Dios .. aún te tengo fé =-
#75034 14/03/04 01:25 AM
Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
mea culpa! I realised that slight omission when I woke up this morning!

The other option is to use the "//"? confused

e.g. //mode <etc>


Both the $calc and the $nick would have to be revaluated?

/timerautolimit 0 10 /mode #chan +l $!calc($!nick(#chan,0) + 5)


Cheers,

DK

Last edited by Darwin_Koala; 14/03/04 01:28 AM.

Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!

Link Copied to Clipboard