mIRC Home    About    Download    Register    News    Help

Print Thread
#236532 03/03/12 07:49 AM
Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
someone can help me I want a banlist to html script

i tried to make one , but that not works frown looky my code

Code:
on *:text:!banhtml*:#: {
  set %file banlist.ini
  unset %banlist
  remove Banlist.html
  write Banlist.html <html>
  write Banlist.html <head>
  write Banlist.html <title>Channel Banlist</title>
  write Banlist.html <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  write Banlist.html <link href="layout.css" rel="stylesheet" type="text/css" />
  write Banlist.html </head>
  write Banlist.html <body>
  write Banlist.html <table class="tablec">
  write Banlist.html <tr>
  write Banlist.html <td colspan="2" class="top">
  write Banlist.html <a href="irc://irc.quakenet.org" rel="nofollow"><img src="http://images.cooltext.com/2470420.jpg"</a>
  write Banlist.html </td>
  write Banlist.html </tr>
  write Banlist.html </table>
  write Banlist.html <table>
  write Banlist.html <tr>
  write Banlist.html <td class="eins"></td>
  write Banlist.html <th>Place</th>
  write Banlist.html <th>Nick</th>
  write Banlist.html <th>Mask</th>
  write Banlist.html <th>Banned on</th>
  write Banlist.html <th>Expires on</th>
  write Banlist.html <th>Banned by</th>
  write Banlist.html <td class="eins"></td>
  write Banlist.html </tr>
  write Banlist.html <tr>
  write Banlist.html <td colspan="7" class="seperator"></td>
  write Banlist.html </tr>
  set %max $mini(%file,,nick,0)

  var %x = 1

  while (%x < %max) {

    write Banlist.html <tr>
    write Banlist.html <td class="eins"></td>
    write Banlist.html <td class="toplist"> %x </td>
    write Banlist.html <td class="toplist"><a href="http://insaneboard.comeze.com/bans/ $+ $readini(%file, $ini(%file,%x), nick) $+ .html" target="_blank" rel="nofollow"> $+ $readini(%file, $ini(%file,%x), nick) $+ </a></td>  
    write Banlist.html <td class="toplist"> $readini(%file, $ini(%file,%x), mask) </td>
    write Banlist.html <td class="toplist"> $readini(%file, $ini(%file,%x), bannedon) </td>
    write Banlist.html <td class="toplist"> $readini(%file, $ini(%file,%x), expireson) </td>
    write Banlist.html <td class="toplist"> $readini(%file, $ini(%file,%x), bannedby) </td>
    write Banlist.html  <td class="eins"></td>
    write Banlist.html </tr>
    inc %x
  }
  write Banlist.html </tr>
  write Banlist.html </table>
  write Banlist.html <br>
  write Banlist.html <table>
  write Banlist.html <tr>
  write Banlist.html <td class="seperator"></td>
  write Banlist.html </tr>
  write Banlist.html <tr>
  write Banlist.html <td class="bottom">
  write Banlist.html <a href="http://insaneboard.comeze.com" target="blank" rel="nofollow">[I]Serv</a> BoT @ 2012
  write Banlist.html </td>
  write Banlist.html </tr>
  write Banlist.html </table>
  write Banlist.html </body>
  write Banlist.html </html>
}


(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
And what part of it doesn't work?


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
all when i type !banlist nothing happens
i tried to put Echos , but there is no error

looks i want this :
[img]http://www.ugamer.net/irc/bans/quakenet_ugn.pug.htm[/img]


(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Joined: Feb 2012
Posts: 18
S
Pikka bird
Offline
Pikka bird
S
Joined: Feb 2012
Posts: 18
The ON TEXT event doesn't trigger when you enter the text yourself.

You would have to monitor the ON INPUT event instead.

If you want channel users to use the command as well, you could abstract it to an alias:

e.g.
Code:
alias banlist {
[...] most of your code goes here [...]
}

; Modify your on text event:
on *:text:!banhtml*:#: { /banlist }


You can then enter /banlist to generate the file yourself, and channel users (excluding yourself) can use !banlist . If you still want it triggered when you write !banlist yourself, you can add:
Code:
on *:input:#:{
  if ($1 == !banlist) { /banlist }
}


Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
i understand , but dont know what happend i got nothing frown



(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
You need to loop true the banlist, then gather the info from the loop.
Code:
alias testing {
 var %x = $banlist(#,0)
 while (%x) {
  echo -a $banlist(#,%x)
  dec %x
 }
}

Code untested, but it should give you the iformation from the banlist, then you need to write it to your file.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
I have it so much, can you make this script for me please? :$$


(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
No, to much work with that one.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Originally Posted By: Lenooox
all when i type !banlist nothing happens
i tried to put Echos , but there is no error

looks i want this :
[img]http://www.ugamer.net/irc/bans/quakenet_ugn.pug.htm[/img]


The trigger is !banhtml not !banlist.

Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
Damn this script , does not work frown

thank all answers , but i give it up , im so stupid for this laugh frown

Last edited by Lenooox; 04/03/12 10:57 AM.

(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
Well if you want to give this another shot, try this alias. It will echo out the banlist for the current channel.

Code:
alias bl {
  if (!$chan($chan).ibl) { mode $chan +b | .timerbl 1 1 bl | halt }
  set -l %num 1
  while ($ibl($chan,%num)) {
    echo -a Nick: $v1 / By: $ibl($chan,%num).by / Date: $ibl($chan,%num).date
    inc %num
  }
}


one thing I noticed about the example above using $banlist, it doesn't check if the internal ban list is updated. So if you use it before your client gets the ban list it will return nothing. Also you can't get expiration times since unban timers are local to the client that set the ban.


http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
yeah , Thanks very much!

I would like to save this information in html smile


(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Replace:
echo -a Nick: $v1 / By: $ibl($chan,%num).by / Date: $ibl($chan,%num).date

With:
write Banlist.html Nick: $v1 / By: $ibl($chan,%num).by / Date: $ibl($chan,%num).date


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
you might have to do a bit more to integrate the code I posted. Since if the ibl isn't up to date it has to issue a command to update and then run itself again. Though an easy way around that would be to run the /mode $chan +b when the whole script is triggered and use a timer to start the rest of it.


http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
ahh thank you pball im so sorry i dont saw your post :$

thank you folks smile


(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
how can i put other tables or backgrounds? :$
i get only this! [img]http://lenoox.insaneboard.comeze.com/Banlist.html[/img]

im sorry for my stupid questions frown


(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
In your first post u had code writed to the html file, try around a bit with that code..

By the way, no picture at that url.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard