mIRC Home    About    Download    Register    News    Help

Print Thread
help me to make a script #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

Re: help me to make a script [Re: hCK] #208101 13/01/09 07:58 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
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"
Re: help me to make a script [Re: argv0] #208102 13/01/09 09:03 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
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 }
}

Re: help me to make a script [Re: Tomao] #208103 13/01/09 09:54 AM
Joined: Jul 2006
Posts: 3,574
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,574
Code:
on *:TEXT:!banlist:#:tokenize 44 End of Ban List,bltzmen,huGanimus,YmmaT,Test,User of Ban List | msg $chan $*



Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: help me to make a script [Re: Wims] #208107 13/01/09 12:47 PM
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

Re: help me to make a script [Re: hCK] #208119 13/01/09 06:57 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
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.
Re: help me to make a script [Re: Tomao] #208131 14/01/09 12:58 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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
}