mIRC Home    About    Download    Register    News    Help

Print Thread
#85062 03/06/04 03:15 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
on *:text:!addauth*:#channel:{
if ($ulevel == 11) {
if ($1 == !addauth) {
/guser $2 $3 {
/msg $chan $3 has ben added auth lvl $2 on XsN|Bot
}
}
}
}

on *:text:!removeauth*:#channel:{
if ($ulevel == 11) {
if ($1 == !removeauth) {
/ruser $3 {
/msg $chan Auth lvl $2 has been removed from $3
}
}
}
}


The first part will add a user to my bot user list... BUT... The second part dosnt work as its suppose to do! When i add user and i want to remove him again it says:

* No such user in user list

whats wrong?

Last edited by NoPleX; 03/06/04 03:20 AM.

if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85063 03/06/04 04:36 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
When you use/guser level nick mIRC looks up the user and adds them with a masktype of 6 (See /help $mask). You are not specifying that masktype in the ruser command.

on *:text:!addauth*:#channel:{
  • if ($ulevel == 11) {
    guser -a $2 $$3
    msg $chan $3 has ben added auth lvl $2 on XsN|Bot
    }
}

on *:text:!removeauth*:#channel:{
  • if ($ulevel == 11) {
    ruser $$2 $3 6
    msg $chan Auth lvl $2 has been removed from $3
    }
}

There isn't a need to check if $1 == !addauth/!removeauth as they are the triggers smile

#85064 03/06/04 04:50 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
just removeing something:

on *:text:!addauth*:#channel:{
if ($ulevel == 11) {
guser -a $2 $3
msg $chan $3 has ben added auth lvl $2 on XsN|Bot
}
}

on *:text:!removeauth*:#channel:{
if ($ulevel == 11) {
ruser $3 6
msg $chan Auth lvl $2 has been removed from $3
}
}


can you make the script read what level the user has you are removeing and /msg that to channel?


The script workes great just need to know that! laugh


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85065 03/06/04 05:08 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Well you add $2 into the ruser command.
If the level to be removed is specified $2 will be that level, if not then $2 will be the nick and all levels will be removed.
  • !removeauth [level] <nick> <- removes [level]
    !removeauth <nick> <- removes ALL levels
on *:text:!removeauth*:#channel:{

  • if ($ulevel == 11) {
    ruser $$2 $3 6
    if $3 { msg $chan Auth lvl $2 has been removed from $3 }
    else msg # All levels have been removed from $2
    }
}

#85066 03/06/04 05:16 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
yes but i ment i you could manke this the trigger:

!removeauth <nick>


Without typing level so it will jus remove all levels from that nick!


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85067 03/06/04 05:23 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
As I said...
Quote:
  • !removeauth [level] <nick> <- removes [level]
    !removeauth <nick> <- removes ALL levels

grin

#85068 03/06/04 05:27 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
oh sorry missed that frown

Well when you are here can you telll me how you make
$read(remote.ini)

read all and send all like this

/notice $nick $chan $read(remote.ini)

how do you make it read all the lines at once?


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85069 03/06/04 05:31 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Well you could use $read(file,N) in a loop to send all lines, but a MUCH better way would be to
  • /.play -n $nick "file.txt" 2000
See /help /play

#85070 03/06/04 06:08 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
Ok thanks now it works grate laugh i added a user list to it so i could remember all the users levels laugh

on *:text:!authlist:#channel:{
if ($ulevel == 11) {
/play -n $nick remote.ini 1750
}
}


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#85071 03/06/04 07:02 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
OK Great smile

Just one Q. Why are all these using "if ($ulevel == 11) {" instead of using the level in the event itself?
Code:
on +11:text:!authlist:#channel:{ 
  .play -n $nick remote.ini 1750  
}
wink

#85072 03/06/04 10:19 PM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
My overviwe is better if i use if ($ulevel == 11) i read it better that way wink


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

Link Copied to Clipboard