mIRC Home    About    Download    Register    News    Help

Print Thread
banlist to .htm file #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
Re: banlist to .htm file [Re: Lenooox] #236533 03/03/12 07:59 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
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"
Re: banlist to .htm file [Re: Lenooox] #236534 03/03/12 08:05 AM
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
Re: banlist to .htm file [Re: Lenooox] #236536 03/03/12 02:33 PM
Joined: Feb 2012
Posts: 18
S
Steeeve Offline
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 }
}


Re: banlist to .htm file [Re: Lenooox] #236537 03/03/12 08:01 PM
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
Re: banlist to .htm file [Re: Lenooox] #236539 03/03/12 08:13 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
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,.) }
Re: banlist to .htm file [Re: Lenooox] #236540 03/03/12 08:40 PM
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
Re: banlist to .htm file [Re: Lenooox] #236541 03/03/12 09:13 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
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,.) }
Re: banlist to .htm file [Re: Lenooox] #236544 04/03/12 01:56 AM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
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.

Re: banlist to .htm file [Re: Lenooox] #236546 04/03/12 10:56 AM
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
Re: banlist to .htm file [Re: Lenooox] #236548 04/03/12 03:16 PM
Joined: Nov 2009
Posts: 295
P
pball Offline
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.
Re: banlist to .htm file [Re: Lenooox] #236549 04/03/12 06:16 PM
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
Re: banlist to .htm file [Re: Lenooox] #236550 04/03/12 10:24 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
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,.) }
Re: banlist to .htm file [Re: sparta] #236552 05/03/12 01:38 AM
Joined: Nov 2009
Posts: 295
P
pball Offline
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.
Re: banlist to .htm file [Re: Lenooox] #236554 05/03/12 01:18 PM
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
Re: banlist to .htm file [Re: Lenooox] #236555 05/03/12 06:23 PM
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
Re: banlist to .htm file [Re: Lenooox] #236556 05/03/12 09:47 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
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,.) }