Thread: Knowledgebase
View Single Post
Author Message
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 02-03-2008 , 07:15   Knowledgebase
Reply With Quote #1

This plugin allows to store stuff which can be queried using chat commands, like a clan's homepage URL or small howtos.

Commands:
  • ? <keyword>
    See the description for this keyword
  • ! <keyword> <description>
    Store a new description for this keyword (Chat admin level required)
  • kbase_list
    Lists all defined keywords (apart from SteamIDs)
  • kbase_delete <keyword>
    Deletes the description for the given keyword
If you specify "me" as the keyword, the string will be stored/deleted using your SteamID. That way, every player can define their very own "me" string, which will also be displayed automatically as a welcome message.
Your SteamID will not be printed in the Messages, it will be replaced with your name.

CVars:
kbase_version - guess what
kbase_public - if 1, answers are displayed to everyone instead of just the person who asked the question.

example:
Code:
? knowledgebase
[KB] Keyword not found.
! knowledgebase "cool stuff coded by Gee"
[KB] Defined knowledgebase as "cool stuff coded by Gee".
? knowledgebase
[KB] knowledgebase: cool stuff coded by Gee
! me "I am the Ubermensch!"
[KB] Defined me as "I am the Ubermensch!"
? me
[KB] MistaGee: I am the Ubermensch!
All the data is stored in an SQL database, you need to have named configs "knowledgebase" or "default" for this to work. I've tested it to work both with MySQL and SQLite.


Changes:
1.6: Introduced kbase_delete
1.5: Introduced kbase_list, made kbase_public 1 per default
1.4: Special keyword "me" can be defined by every player, those defined are displayed publicly when players join (like chanserv does in irc)
1.3: Bugfix - knowledgebase table was not created in SQLite
1.2: Bugfix - forgot to call CloseHandle on the DB statements
1.1: introduced kbase_public cvar

MGee
Attached Files
File Type: sp Get Plugin or Get Source (knowledgebase.sp - 1738 views - 8.3 KB)
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble

Last edited by MistaGee; 02-06-2008 at 20:05.
MistaGee is offline
Send a message via ICQ to MistaGee