BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => 0.3.x Custom/Unofficial Modules => Topic started by: Ebag333 on June 06, 2007, 07:02:20 am

Title: AccessControlGUI.php
Post by: Ebag333 on June 06, 2007, 07:02:20 am
Well, I finally decided to deal with the spam you get when using !commands <channel>.

Currently when using it, you see this:

Code: [Select]
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:

Code: [Select]
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:

Code: [Select]
<?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:

Code: [Select]
<?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.
Title: Re: AccessControlGUI.php
Post by: Khalem on June 06, 2007, 07:55:36 pm
Committed to SVN.
SimplePortal 2.3.7 © 2008-2024, SimplePortal