Archive > BeBot Hyborian modules

KOS Module w/ Guild KOS

(1/7) > >>

kardsen:
"Borrowed" from Noers 4.x updated Kos module"

Commands
!kos     (Displays both the KOS guilds and Players.. Guilds on top.  In alpha order)
!kos padd <player> <reason>    (adds player to KOS list.  Note Reason is optional)
!kos gadd <guild> :<reason>    (adds guild to KOS list. Note : is needed between reason and name)
!kos pdel <player>    (deletes player from KOS list)
!kos gdel <guild>    (deletes guild from KOS list)

=============================================
Rev 1.   kos.php and gkos.php  w/ 2 seperate Databases
Rev 2.   kos.php and gkos.php combined.   New database created.
Rev 2a.   Fixed error in code.  :  is now required between guild name and reason.
Rev 2b.   Fixed !help command error.
When incorrect syntax used, bot said to use !help gkos for command list.  Should be  !help kos.
Included, modified Whois.php file to display if user is on kos list when doing a !whois lookup
Removed the drop table statements.  Should no longer be needed.
Rev 2c.  Updated whois.php file for R46-48 of bebot Hyborian.

Also, each command has it's own permissions.  See /tell BOTNAME !commands subs kos.


TO INSTALL
Without Whois Mod
Download  kos.phps  rename to kos.php  install to ./custom/modules/

With Whois Mod - Verified working with bebot version r24 through r26
Download  kos.phps  rename to kos.php  install to ./custom/modules/
Download  whois.phps  rename to whois.php  overwrite existing file in ./modules/

CheRny:
Well, I like kos module as you could add a guild as well, but comparing to blacklist is has some limitation as blacklist in integrated with whois and notes modules. For ex. if you do !whois and if there is a name in blacklist, whois function will show you warning: Warning! Blacklisted!, which is very good as well as you could see a reason for blacklisting. It'll be great if you could add similar function to your kos module. I know you will need to make some changes in other modules. For ex. in whois.php:

- 174:            $blname = $this -> bot -> db -> select("SELECT name FROM #___blacklist WHERE name = '". $name . "'");
+ 174:             $blname = $this -> bot -> db -> select("SELECT * FROM koslist WHERE player = '$name' AND type = 'playerkos'");

This way whois will show a warning is a player is in kos list.

kardsen:
Cheny,

I'll look into this once I finish up fixing my supplies module.
Though I tend to shy away from messing with original coding.

kardsen:
Cheny,

Had to change a couple things in whois.php

Should have your requested effect now.
please download new  kos.php and  whois.php and put in respective folders.

CheRny:
kardsen,

thanks a lot for it, for a few hours works great.

Navigation

[0] Message Index

[#] Next page

Go to full version