mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#85775 07/06/04 07:40 PM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
The script still kicks and ban users with level 10 or 11!!!!

alias CheckIdlers {
var %chan = #needhelp, %a = $nick(%chan,0)
while %a {
if ($ulevel != 10) || ($ulevel != 11) {
if ($nick(%chan,%a).idle > 20) {
ban -ku300 %chan $nick(%chan,%a) 2 Please do not idle. Return in a while if you need help or want to help
}
}
dec %a
}
}


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85776 07/06/04 07:46 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Try what CtrlAltDel suggested smile

if ($ulevel == 10) || ($ulevel == 11) { return }

instead of:

if ($ulevel != 10) || ($ulevel != 11) {

Also make sure that the mask in your user list matches the IP of the levels 11 & 10


"All we are saying is give peace a chance" -- John Lennon
#85777 07/06/04 08:58 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
$ulevel
Returns the user level that was matched for the currently triggered event.

The matching level when you trigger an event is your own level.

Also:
When you join a channel, mIRC knows of only one user on that channel, you. You have to wait until the names list is sent (raw 366 is the end of /names list) to know of other users on that channel, and you can't tell their user level until you have them in your IAL.

#85778 07/06/04 09:52 PM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
alias CheckIdlers {
var %chan = #needhelp, %a = $nick(%chan,0)
while %a {
if ($ulevel == 10) || ($ulevel == 11) { return }
if ($nick(%chan,%a).idle > 20) {
ban -ku300 %chan $nick(%chan,%a) 2 Please do not idle. Return in a while if you need help or want to help
}
}
dec %a
}
}



doesnt work! It chrashes mirc totaly :S

But i still dont know what will make it work confused


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85779 07/06/04 10:04 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Well as I tried to explain .. using $ulevel can't work.
That alias would be freezing rather than crashing miRC. You have bracket mismatches and the /dec is outside the while { }....


Edit: Try this...
Code:
on me:*:join:#needhelp:inc %who. $+ # | who #
raw 315:*:{
  if %who. [ $+ [ $2 ] ] {
    unset %who. $+ $2
    .timer 0 60 check.idlers $2
    halt
  }
}
alias check.idlers {
  if $chan($$1).ial != $true { echo -ec i $1 IAL is not full for $1 | return }
  if $me !isop $1 { echo -ec i $1 You are not opped on $1! | return }
  var %i = 1
  while $nick($1,%i,r) {
    %a = $ifmatch
    if !$istok(10 11,$level($ial(%a)),32) && $nick($1,%a).idle > 20 {
      ban -ku300 $1 %a 2 Please do not idle. Return in a while if you need help or want to help.
    }
    inc %i
  }
}
raw 352:*:if %who. [ $+ [ $2 ] ] { halt }

To use it as an /alias you must specify the #channelname.. /check.idlers #needhelp

Edit again: Added check for your op status.

#85780 07/06/04 10:07 PM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
Ok so the script is imposible to make? You cant make it do anything on a user level?


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85781 07/06/04 10:34 PM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
ok so you want me to put #needhelp here:

alias check.idlers #needhelp { if $chan($$1).ial != $true { echo -ec i $1 IAL is not full for $1 | return }


cause if thats what you ment that doesnt work!


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85782 07/06/04 10:43 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Nope. You don't need to put anything there, and what I posted is NOT one line, and will NOT work if you try and use it as such. you need to have it formatted as the 20 or so lines that it is in my post.

#85783 07/06/04 10:59 PM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
on me:*:join:#needhelp:inc %who. $+ # | who #
raw 315:*:{
if %who. [ $+ [ $2 ] ] {
unset %who. $+ $2
check.idlers $2
halt
}
}

alias check.idlers {
if $chan($$1).ial != $true { echo -ec i $1 IAL is not full for $1 | return }
var %i = 1 while $nick($1,%i,r) {
%a = $ifmatch
if !$istok(10 11,$level($ial(%a)),32) && $nick($1,%a).idle > 20 {
ban -ku300 $1 %a 2 Please do not idle. Return in a while if you need help or want to help.
}
inc %i
}
}
raw 352:*:if %who. [ $+ [ $2 ] ] { halt }



nothing hapends confused


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85784 07/06/04 11:18 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Yeah change this part, sorry blush This will check every 60 secs from when you join (from when the who list is finished).
Code:
raw 315:*:{
  if %who. [ $+ [ $2 ] ] {
    unset %who. $+ $2
    [color:blue].timer 0 60[/color] check.idlers $2
    halt
  }
}


#85785 07/06/04 11:40 PM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
oh no wonder it didnt work :P

Well nobody is perfect wink


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85786 07/06/04 11:46 PM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
on me:*:join:#needhelp:inc %who. $+ # | who #
raw 315:*:{
if %who. [ $+ [ $2 ] ] {
unset %who. $+ $2
timer 0 5 check.idlers $2
halt
}
}

alias check.idlers {
if $chan($$1).ial != $true { echo -ec i $1 IAL is not full for $1 | return }
var %i = 1 while $nick($1,%i,r) {
%a = $ifmatch
if !$istok(10 11,$level($ial(%a)),32) && $nick($1,%a).idle > 20 {
ban -ku300 $1 %a 2 Please do not idle. Return in a while if you need help or want to help.
}
inc %i
}
}
raw 352:*:if %who. [ $+ [ $2 ] ] { halt }



Sill nothing hapends :S no kick no ban no nothing confused


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85787 07/06/04 11:48 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
var %i = 1 while $nick($1,%i,r) {
should be
  • var %i = 1
    while $nick($1,%i,r) {

#85788 08/06/04 12:04 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
oh my bad :S


YES NOW THE SCRIPT WORKS laugh laugh laugh laugh laugh

I made a change so ops and voiced who aint level 10 & 11 also will get kicked and banned

on me:*:join:#needhelp:inc %who. $+ # | who #
raw 315:*:{
if %who. [ $+ [ $2 ] ] {
unset %who. $+ $2
timer 0 5 check.idlers $2
halt
}
}

alias check.idlers {
if $chan($$1).ial != $true { echo -ec i $1 IAL is not full for $1 | return }
var %i = 1
while $nick($1,%i) {
%a = $ifmatch
if !$istok(10 11,$level($ial(%a)),32) && $nick($1,%a).idle > 20 {
ban -ku300 $1 %a 2 Please do not idle. Return in a while if you need help or want to help.
}
inc %i
}
}
raw 352:*:if %who. [ $+ [ $2 ] ] { halt }




Thanks alot for your great help. Your worth 5 stars wink

And sorry for all the troble!

- NoPleX


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
Page 2 of 2 1 2

Link Copied to Clipboard