mIRC Homepage
Posted By: Hooligan REQ: scriptie - 11/04/05 09:50 AM
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?
Posted By: Mentality Re: REQ: scriptie - 11/04/05 10:00 AM
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,
Posted By: Hooligan Re: REQ: scriptie - 11/04/05 10:10 AM
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?
Posted By: Mentality Re: REQ: scriptie - 11/04/05 10:39 AM
You need to replace #chan with the channel name. Other than that, yes :-)

Regards,
Posted By: Hooligan Re: REQ: scriptie - 11/04/05 02:52 PM
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...
Posted By: SladeKraven Re: REQ: scriptie - 11/04/05 04:13 PM
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
Posted By: Hooligan Re: REQ: scriptie - 14/04/05 11:55 AM
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
Posted By: Hooligan Re: REQ: scriptie - 14/04/05 02:07 PM
ups i copied it higher in my remote file and now it works fine
Posted By: Hooligan Re: REQ: scriptie - 14/04/05 02:11 PM
and how would it look like to unban the same way?
Posted By: SladeKraven Re: REQ: scriptie - 14/04/05 05:59 PM
How do you mean unban? Sorry, I'm dense!
Posted By: Hooligan Re: REQ: scriptie - 15/04/05 05:51 AM
lets say if someone in my userlist writes !unban <nick>

i'll unban it, it's oposite of !kb let's say =]
Posted By: The_Game Re: REQ: scriptie - 15/04/05 06:31 AM
/help /ruser
Posted By: SladeKraven Re: REQ: scriptie - 15/04/05 08:55 AM
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.
© mIRC Discussion Forums