More information about what's new!
New Blog Entry: /index.php?do=blog&show=50
??channel syntax
??channel <add|del|ins|put|rep|app|pre>
Channel entries show per channel and show in a list as #.
New Channel entries can be added to the database by channel operators.
??global syntax
??global <add|del|ins|put|rep|app|pre>
Global entries show on every channel and show in a list as *.
New Global entries can only be added to the database by global operators. (Type !admins)
??channel add <keyword> <definition>
* Adds a new entry into the database for that channel, (example: ??channel add banana stand)
* If new entry exists, inserts a new record for this entry (example: ??channel add banana yellow)
Example:
	We want to find out what 'banana' is set to, in the database.
	[15:34]  <Floris> ?? banana
	[15:34]  <database> banana[x]: No definition found for word.
	It is empty, it turns out the entry does not exist. 
	
	Now we can use the ??channel add command to add something for it.
	[15:36]  <Floris> ??channel add banana yellow
	[15:36]  <database> Definition added
	We told it to store a definition for banana, and the bot replied it has done so. 
	
	Now if we query the bot for banana again, we obviously get this:
	[15:36]  <Floris> ?? banana
	[15:36]  <database> banana#: yellow
	Note: The reply has the # character behind it, indicating this is a channel only definition for banana.
	
	We can add banana again, or rather, using the add command, add another definition for banana:
	[15:39]  <Floris> ??channel add banana Great in a bananasplit
	[15:39]  <database> Definition added
	The definition got added, the bot confirmed this. 
	
	Now if we query the bot for banana, see what happens:
	[15:40]  <Floris> ?? banana
	[15:40]  <database> banana[1]#: yellow
	[15:40]  <database> banana[2]#: Great in a bananasplit
	We have 2 entries for # this channel, saying yellow for one, and great in a bananasplit for the other.
	
	An advanced option for add are variables, a quick and simple example is to use $1,
	allowing you to add a dynamic definition. Let's add something like 'throwing a banana at ...someone':
	[15:43]  <Floris> ??channel add banana $n throws a banana at $1. Score!
	[15:44]  <database> Definition added
	Note: The $n is a variable for the nickname who queries the bot, and the $1 is the first variable.
	
	Now, if we query the bot with a variable (a user, aka: target) we do it like this:
	[15:45]  <Floris> ?? banana Chroder
	[15:45]  <database> banana[1]#: yellow
	[15:45]  <database> banana[2]#: Great in a bananasplit
	[15:45]  <database> banana[3]#: Floris throws a banana at Chroder. Score!
	As you can see, user Floris queried the bot, we get all the definitions, 
	but the third one replaced the variables making the entry dynamic.

	Note: we use ??channel, so this entry will only show up in this particular channel!
	If you change to another channel where the bot is, and query ?? banana
	you will only get that channel's definitions and the global ones (if any). 

	Using the del,app,pre,ins,put,rep commands you can now manipulate the banana keyword definitions further.
	
??channel del <keyword> (<#>)
* Deletes a keyword from the database, and all its entries for that channel, (example: ??channel del banana)
* Use numeric to define individual entry to delete. (example: ??channel del banana 2)
??channel ins <keyword> <#> <definition>
* Inserts definition as number in list of keyword for that channel. (example: ??channel ins banana 2 grows on tree)
??channel put <keyword> <#> <definition>
* Inserts definition after another number in list of keyword for that channel. (example: ??channel put banana 5 grows on tree)
??channel rep <keyword> <#> <definition>
* Replace a definition - number in list of keyword for that channel. (example: ??channel rep banana 1 bananasplit)
??channel app <keyword> <#> <definition>
* Append text to a definition - number in list of keyword for that channel. (example: ??channel app banana 1 desert)
??channel pre <keyword> <#> <definition>
* Preppend text to a definition - number in list of keyword for that channel. (example: ??channel pre banana 1 yummy)
The below legend is for the staff, as a reference point, you can stop reading now. :)
legend:
0 = disabled
1 = everyone
2 = voice
3 = bot voice
4 = halfop
5 = bot halfop
6 = op
7 = bot op
8 = bot master
9 = bot owner

2, 4 and 6 use IRC modes
0 and 1 dont
the rest use party line user flags
3 = user +v, 5 = +l, 7 = +o, 8 = +m and 9 = +n
setudef int learn-define-level
setudef int learn-defineall-level
setudef int learn-delete-level
setudef int learn-definitions-level
setudef int learn-globaldefinitions-level
setudef int learn-explain-level
setudef int learn-explainall-level
setudef int learn-explainextra-level
setudef int learn-explainallextra-level
setudef int learn-search-level
setudef int learn-redirect-level
setudef int learn-floodtimeout
setudef int learn-maxlines
setudef flag learn-privmsg
Brian, to add a database bot into a new channel,
telnet into the specific bot, and .+chan #newchan
and copy the below chanset block into the partyline.
And confirm with .chaninfo #newchan if it's added correctly.
Of course, replace #newchan with the new channel name (in notepad).
Test the bot in the channel as user, aop, and oper. 
And then link the founder to this documentation and the blog entry.
And type .save in the bot. And you can quit the partyline.

.chanset #newchan learn-define-level 6
.chanset #newchan learn-definitions-level 6
.chanset #newchan learn-explain-level 1
.chanset #newchan learn-explainextra-level 1
.chanset #newchan learn-search-level 1
.chanset #newchan learn-delete-level 8
.chanset #newchan +learn-privmsg
.chanset #newchan learn-defineall-level 8
.chanset #newchan learn-explainall-level 1
.chanset #newchan learn-redirect-level 1
.chaninfo #newchan

The above means: only irc operators can use global, only channel ops can add, and everybody can query the bot.
Variables:
$$ = A literal $
$b = The bot's nick
$c = The channel the query was issued in
$h = The party line handle of the query issuer
$u = The ident@host portion of the query issuers hostmask
$w = The word being queried
$t = Where the definition is being sent (usually channel, but in case of flood or redirection is a nick)
$n = The query issuers nick
$# = The #'th word after the definition's word in the query (eg $1 is one from ? word one)
$#- = The #'th word to the end of the query