Well, I finally decided to deal with the spam you get when using !commands <channel>.
Currently when using it, you see this:
Cafraid: Current access levels for Private Chatgroup (Page 1) (page 1 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 1) (page 2 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 2) (page 1 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 2) (page 2 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 3) (page 1 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 3) (page 2 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 4) (page 1 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 4) (page 2 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 5) (page 1 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 5) (page 2 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 6) (page 1 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 6) (page 2 of 2)
Cafraid: Current access levels for Private Chatgroup (Page 7)
With the changed code, you see this:
Cafraid: Current access levels for Private Chatgroup (page 1 of 9)
Cafraid: Current access levels for Private Chatgroup (page 2 of 9)
Cafraid: Current access levels for Private Chatgroup (page 3 of 9)
Cafraid: Current access levels for Private Chatgroup (page 4 of 9)
Cafraid: Current access levels for Private Chatgroup (page 5 of 9)
Cafraid: Current access levels for Private Chatgroup (page 6 of 9)
Cafraid: Current access levels for Private Chatgroup (page 7 of 9)
Cafraid: Current access levels for Private Chatgroup (page 8 of 9)
Cafraid: Current access levels for Private Chatgroup (page 9 of 9)
The problem is that it gets cut off halfway through a command (shows the command but not the access levels), but that happens currently anyway.
Couple of changes.
Line 105:
<?php
$blob .= "<br>Click on an access level to change it for that command.##end##<br>";
?>
Removed an annoying . before the first <br> .
Line 122:
<?php
foreach ($rights as $right)
{
if (isset($this -> bot -> commands[$channel][$right['command']]))
{
$cmdtext = "Access to command: ##highlight##<pre>{$right['command']}##end## <br> [" .
$this -> Make_access_string($right['command'], $right['minlevel'], $channel) . "]";
$blob .= "<br>" . $cmdtext . "<br>";
}
}
$page_counter ++;
$this -> bot -> send_tell($name, $this -> bot -> make_blob($title, $blob));
?>
Removed the bit of code to try and split up the pages, so the bot can handle it automagically.