mIRC Home    About    Download    Register    News    Help

Print Thread
#150356 01/06/06 11:06 PM
Joined: May 2006
Posts: 87
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2006
Posts: 87
on *:text:*!voiceme*:#: {
if ($1 == %c $+ !voiceme) {
mode $chan +v $nick }
if (TestingUser isin $nick) return
if (Sableye isin $nick) return
if (PokeMaster isin $nick) return
if (Abhishek isin $nick) return
if (Emokid isin $nick) return
if (Kady isin $nick) return
if (Pinkie isin $nick) return
else {
.ban -ku120 $chan $nick 5,8Read the topic! [2 minute ban]
}
}

This is a !voiceme script. What it does is that it voices anyone on the list when someone types in !voiceme, but bans anyone else that is not on the list. The problem is that everyone is getting voiced instead of the people on the list. How do I go about making it so that only the people on the list can get voiced when they type in !voiceme?

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:
on *:text:*!voiceme*:#: {
if ($1 == %c $+ !voiceme) {
mode $chan +v $nick }
if (TestingUser isin $nick) return
if (Sableye isin $nick) return
if (PokeMaster isin $nick) return
if (Abhishek isin $nick) return
if (Emokid isin $nick) return
if (Kady isin $nick) return
if (Pinkie isin $nick) return
else {
.ban -ku120 $chan $nick 5,8Read the topic! [2 minute ban]
}
}


you have the voice ahead of the checks for nicks

try this
Code:

on *:text:$(%c $+ !voiceme):#: {
  if (TestingUser isin $nick) { mode $chan +v $nick }
  if (Sableye isin $nick) { mode $chan +v $nick }
  if (PokeMaster isin $nick) { mode $chan +v $nick }
  if (Abhishek isin $nick) { mode $chan +v $nick }
  if (Emokid isin $nick) { mode $chan +v $nick }
  if (Kady isin $nick) { mode $chan +v $nick }
  if (Pinkie isin $nick) { mode $chan +v $nick }
  else {
    .ban -ku120 $chan $nick 5,8Read the topic! [2 minute ban]
  }
}


I dont see where you are setting %c but I take that to be some setting that changes once in a while in another alias/script

Joined: May 2006
Posts: 87
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2006
Posts: 87
I tried your script out and it partly works. It does only voice the users on the list, and it also does not voice the users that are not on the list. However the ban is not activated. The user that is running the script is a half op on the channel.

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on *:text:$(%c $+ voiceme):#:{
  var %nicks = TestingUser Sableye PokeMaster Abhishek Emokid Kady Pinkie
  if ($istok(%nicks,$nick,32)) mode $chan +v $nick
  else ban -ku120 $chan $nick 5,8Read the topic! [2 minute ban]
}

Joined: May 2006
Posts: 87
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2006
Posts: 87
hixxy, your script didn't even do anything even when the user hosting the script was opped.
I prefer to use MikeChat's script if the ban works, but so far I have had no luck.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 on @*:text:*!voiceme*:#:{
  var %a = 1, %b = $nick($chan,0,a,v)
  while %a <= %b {
    if $istok(Testinguser sableye pokemaster abhishek emokid kady pinkie,$nick($chan,%a,a,v),32) {
      .mode $chan +v $nick($chan,%a),32)
    }
    else {
      ban -k $chan $nick($chan,%a,a,v)
    }
    inc %a
  }
}
 


I don't understand why you have the %c in your original attempt, but the above should work per my understanding of your request.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
on *:text:$(%c $+ !voiceme):#: {
  if (TestingUser isin $nick) $&
    || (Sableye isin $nick) $&
    || (PokeMaster isin $nick) $&
    || (Abhishek isin $nick) $&
    || (Emokid isin $nick) $&
    || (Kady isin $nick) $&
    || (Pinkie isin $nick) { mode $chan +v $nick }
  else {
    .ban -ku120 $chan $nick 5,8Read the topic! [2 minute ban]
  }
}

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
on *:text:$(%c $+ !voiceme):#:{
  var %nicks = TestingUser Sableye PokeMaster Abhishek Emokid Kady Pinkie
  if ($istok(%nicks,$nick,32)) mode $chan +v $nick
  else ban -ku120 $chan $nick 5,8Read the topic! [2 minute ban]
}


hixxy: Missed a ! in the call. Now it should work, and (imho) is a better alternative.

Last edited by KingTomato; 02/06/06 06:17 AM.

-KingTomato
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Good point. I assumed that %c was a stored command prefix.


Link Copied to Clipboard