mIRC Home    About    Download    Register    News    Help

Print Thread
#117014 11/04/05 09:50 AM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
Hey one more time, now maybe u lads have a lil script that does this: ....

let's say i want some people who are in my userlist to ban ppl using public command it should look like :

<algiz> !kb blet
* Hooligan sets mode: +b *!*x@62.162.233.*

smth like this...

any suggestions?

#117015 11/04/05 10:00 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
You need to use the ON TEXT event, see /help on text.

Example:

on @userlevel:text:!kb*:#channel:{
if ($2 != $me) && ($2 != $nick) && ($2 ison #) {
ban -k # $2 3 Ban requested by: $nick
}
}


You may also wish to see /help access levels and /help /auser.

Regards,

#117016 11/04/05 10:10 AM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
so the full snippet would look like
Code:
 
 on @10:text:!kb*:#chan:{ 
if ($2 != $me) &amp;&amp; ($2 != $nick) &amp;&amp; ($2 ison #) { 
ban -k # $2 3 Ban requested by: $nick 
} 
} 


right?

#117017 11/04/05 10:39 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
You need to replace #chan with the channel name. Other than that, yes :-)

Regards,


Mentality/Chris
#117018 11/04/05 02:52 PM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
ok i've done this

added user to level 10

added this code to my remotes and wrote /remote on

but when that user writes !kb in chan nothing happens...

#117019 11/04/05 04:13 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
The code you provided works for me. smile

Are you sure you're adding a user sufficiently and typing

/auser 10 <Nick>

and not

/auser <Nick> 10

#117020 14/04/05 11:55 AM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
confused

i did this

/auser 10 Night^Fly
* Added Night^Fly to user list

in my remote.ini i see this: 10:Night^Fly

my script looks like this :
Code:
  
on @10:TEXT:!kb*:#cs:{ 
  if ($2 != $me) &amp;&amp; ($2 != $nick) &amp;&amp; ($2 ison #) {
    ban -k # $2 3 Ban requested by: $nick 
  } 
} 


but it does ...

[14:48] <Night^Fly> !kb Aras-

and nothing.... frown

i'm not baning anyone

#117021 14/04/05 02:07 PM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
ups i copied it higher in my remote file and now it works fine

#117022 14/04/05 02:11 PM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
and how would it look like to unban the same way?

#117023 14/04/05 05:59 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
How do you mean unban? Sorry, I'm dense!

#117024 15/04/05 05:51 AM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
lets say if someone in my userlist writes !unban <nick>

i'll unban it, it's oposite of !kb let's say =]

#117025 15/04/05 06:31 AM
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
/help /ruser

#117026 15/04/05 08:55 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
How would that be helping he's wanting to unban users not remove users access to the bot. They could try something like..

Code:
on @10:TEXT:!unban*:#cs: {
  if ($2) {
    set -u3 %mask $2
    ub $chan
  } 
}

alias ub {
  if ($chan($$1).ibl) {
    var %x = $ibl($$1,0)
    while (%x) {
      if (%mask == $ibl($$1,%x)) { mode $$1 -b %mask }
      dec %x
    }
  }
}


Which would only work if mIRC has actually seen a ban in the channel.


Link Copied to Clipboard