|
Joined: Jan 2010
Posts: 51
Babel fish
|
OP
Babel fish
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 looky my 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>
}
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
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: Feb 2012
Posts: 18
Pikka bird
|
Pikka bird
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.
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:
on *:input:#:{
if ($1 == !banlist) { /banlist }
}
|
|
|
|
Joined: Jan 2010
Posts: 51
Babel fish
|
OP
Babel fish
Joined: Jan 2010
Posts: 51 |
i understand , but dont know what happend i got nothing
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
You need to loop true the banlist, then gather the info from the loop.
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
Babel fish
|
OP
Babel fish
Joined: Jan 2010
Posts: 51 |
I have it so much, can you make this script for me please? :$$
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
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
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
The trigger is !banhtml not !banlist.
|
|
|
|
Joined: Jan 2010
Posts: 51
Babel fish
|
OP
Babel fish
Joined: Jan 2010
Posts: 51 |
Damn this script , does not work thank all answers , but i give it up , im so stupid for this
Last edited by Lenooox; 04/03/12 10:57 AM.
|
|
|
|
Joined: Nov 2009
Posts: 295
Fjord artisan
|
Fjord artisan
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.
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.
|
|
|
|
Joined: Jan 2010
Posts: 51
Babel fish
|
OP
Babel fish
Joined: Jan 2010
Posts: 51 |
yeah , Thanks very much! I would like to save this information in html
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
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
Fjord artisan
|
Fjord artisan
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.
|
|
|
|
Joined: Jan 2010
Posts: 51
Babel fish
|
OP
Babel fish
Joined: Jan 2010
Posts: 51 |
ahh thank you pball im so sorry i dont saw your post :$ thank you folks
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
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,.) }
|
|
|
|
|