mIRC Home    About    Download    Register    News    Help

Print Thread
#208100 13/01/09 07:23 AM
Joined: Dec 2008
Posts: 24
H
hCK Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Dec 2008
Posts: 24
<Tammy> !banlist
<Tammy|Bot> User of Ban List
<Tammy|Bot> bItzmen
<Tammy|Bot> huGanimus
<Tammy|Bot> YmmaT
<Tammy|Bot> Test
<Tammy|Bot> End of Ban List

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Code:
on *:TEXT:!banlist:#: {
  msg # User of Ban List
  msg # bltzmen
  msg # huGanimus
  msg # YmmaT
  msg # Test
  msg # End of Ban List
}


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on *:TEXT:!banlist:#: {
  var %x = End of Ban List,bltzmen,huGanimus,YmmaT,Test,User of Ban List
  var %y = $numtok(%x,44) | while (%y) { msg # $gettok(%x,%y,44) | dec %y }
}

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Code:
on *:TEXT:!banlist:#:tokenize 44 End of Ban List,bltzmen,huGanimus,YmmaT,Test,User of Ban List | msg $chan $*



#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2008
Posts: 24
H
hCK Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Dec 2008
Posts: 24
hi sir thanks for the fast reply.
btw. sorry my explanation is wrong smile

if i type !banlist the list of ban person will appear

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I think it'd be better doing it this way:

Code:
on @*:BAN:#:write bans.txt - $bnick $+ ( $+ $banmask $+ )
on *:TEXT:!banlist:#:var %x = $lines(bans.txt) | while (%x) { if ($read(bans.txt,%x)) { timer 1 $calc(%x * 2) msg # $v1 } | dec %x }


When a person is banned in your channel, his or her banned nickname or address will be written to a text file called bans.txt, which will be stored in your mirc's directory automatically. Now, when someone commands your bot with !banlist, the script will loop though the content of the text file for all the banned nicknames, if any, and addresses to display in the channel.

Last edited by Tomao; 13/01/09 07:10 PM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Alternative suggestion for the !banlist command

Code:
on *:text:!banlist:#:{
  .play $chan bans.txt 2000
}


Link Copied to Clipboard