collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: AccessControlGUI.php  (Read 7984 times)

0 Members and 1 Guest are viewing this topic.

Offline Ebag333

  • Contributor
  • *******
  • Posts: 134
  • Karma: +0/-0
AccessControlGUI.php
« 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.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: AccessControlGUI.php
« Reply #1 on: June 06, 2007, 07:55:36 pm »
Committed to SVN.
BeBot Founder and Fixer Kingpin

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 109
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal