[[project @ 2002-07-28 22:17:32 by unknown_lamer]
unknown_lamer**20020728221732
 A few things, there is now a bot:exit-hook that is a standard Guile
 hook that is run when the bot shuts down. 2.1.0 was released, so I
 bumped the version number in configure.ac to 2.1.1CVS.
] {
hunk ./ChangeLog 1
+2002-07-27  Clinton Ebadi  <clinton@unknownlamer.org>
+
+	* source/Interp.C (Shutdown): Runs bot:exit-hook hooks
+	(Startup): New var for Scheme: bot:exit-hook. Calls the thunks
+	associated with the hook when Interp::Shutdown is called (bot exit).
+
hunk ./Makefile.in 202
-	-rm -f bobot++.aux bobot++.cp bobot++.dvi bobot++.fn bobot++.ky bobot++.log \
-	  bobot++.pg bobot++.ps bobot++.toc bobot++.tp bobot++.vr
+	-rm -f bobot++.aux bobot++.cp bobot++.cps bobot++.dvi bobot++.fn bobot++.fns \
+	  bobot++.ky bobot++.log bobot++.pg bobot++.ps bobot++.toc \
+	  bobot++.tp bobot++.vr bobot++.vrs
hunk ./NEWS 1
-======================================================================
-====== This is a -*- text -*- file and ===============================
-====== User Visible Changes In Bobot++ ===============================
-======================================================================
+(-*- text -*-)
+User Visible Changes In Bobot++
hunk ./NEWS 4
-IMPORTANT NOTE:
-+====================================================================+
-| As of version 1.98 unknown_lamer is the new maintainer.            |
-| Also as of version 1.98, you must have Guile 1.5.6+ or 1.6.x in    |
-| order to compile scripting support.                                |
-+====================================================================+
+IMPORTANT NOTES: 
+  As of version 1.98 unknown_lamer is the new maintainer.  Also as of
+  version 1.98, you must have Guile 1.5.6+ or 1.6.x in order to
+  compile scripting support.
hunk ./NEWS 36
-- bot-* procedures in Scheme are now bot:*. The onl bot-* functions
+- bot-* procedures in Scheme are now bot:*. The old bot-* functions
hunk ./README 4
-want your scripts to break every other day.
+want your scripts to break every other day. Then again, I'm not
+updated this every day and so far the code is mostly backwards
+compatible. The biggest change is that all bot-* functions are not
+bot:*. A simple 'perl -pi -e s/bot-/bot:/g SCRIPT1 SCRIPT2 .. SCRIPTN'
+should be enough to update your scripts. The bot-* functions are
+defined as aliases for the bot:* functions in bobot-utils.scm, which
+is autoloaded by bobot++.
hunk ./README 13
-rule names. Make install isn't really needed because bobotpp reads
-it's config from the current dir. 2.1 will change this too.
+rule names. In order for the bot to work properly, you must 'make
+install' it so that bobot-utils.scm is installed and can be loaded for
+scripts to use.
hunk ./README 20
-Also see bobot++.texinfo
+Also see bobot++.texinfo, which should be an ok set of docs on how to
+configure and use Bobot++, even if it is horribly incomplete. You
+should still read the old doc in the doc directory because it is more
+complete.
+
+bobotpp --help is also helpful.
hunk ./TODO 23
+* Call hooks/public when bot sends a privmsg to a channel (read IRC
+   protocol spec for other stuff that might need this)
hunk ./bobot++.info 142
+* Misc Scripting Stuff::
hunk ./bobot++.info 374
-File: bobot++.info,  Node: Sending Messages,  Prev: Scheme User Levels,  Up: Scripting
+File: bobot++.info,  Node: Sending Messages,  Next: Misc Scripting Stuff,  Prev: Scheme User Levels,  Up: Scripting
hunk ./bobot++.info 417
+
+File: bobot++.info,  Node: Misc Scripting Stuff,  Prev: Sending Messages,  Up: Scripting
+
+Misc. Scripting Stuff
+=====================
+
+   These are a few useful things that I thought people writing scripts
+might want to know.
+
+   If you want to execute code when the bot exits, just do `add-hook!
+bot:exit-hook THUNK' where THUNK is an argumentless procedure (a
+thunk). When the bot exits your thunk will be called.
+
hunk ./bobot++.info 495
-Node: Adding New Commands4560
-Node: Hooks5803
-Node: Creating a Hook6741
-Node: Hook Types7533
-Node: Scheme User Levels10006
-Node: Sending Messages11135
-Node: High Level Message Functions11703
-Node: Low Level Message Functions11921
-Node: Concept Index12680
-Node: Function Index12862
-Node: Variable Index13123
+Node: Adding New Commands4585
+Node: Hooks5828
+Node: Creating a Hook6766
+Node: Hook Types7558
+Node: Scheme User Levels10031
+Node: Sending Messages11160
+Node: High Level Message Functions11757
+Node: Low Level Message Functions11975
+Node: Misc Scripting Stuff12734
+Node: Concept Index13153
+Node: Function Index13335
+Node: Variable Index13596
hunk ./bobot++.texinfo 27
-@vskip Opt plus 1filll
+@c @vskip O plus 1filll
hunk ./bobot++.texinfo 150
+* Misc Scripting Stuff::        
hunk ./bobot++.texinfo 547
-@node Sending Messages,  , Scheme User Levels, Scripting
+@node Sending Messages, Misc Scripting Stuff, Scheme User Levels, Scripting
hunk ./bobot++.texinfo 586
+@node Misc Scripting Stuff,  , Sending Messages, Scripting
+@section Misc. Scripting Stuff
+
+These are a few useful things that I thought people writing scripts
+might want to know.
+
+If you want to execute code when the bot exits, just do
+@code{add-hook! bot:exit-hook @var{thunk}} where @var{thunk} is an
+argumentless procedure (a thunk). When the bot exits your thunk will
+be called.
+
hunk ./bobot++.texinfo 609
+@bye
+
hunk ./configure 3
-# Generated by GNU Autoconf 2.53 for Bobot++ 2.1CVS.
+# Generated by GNU Autoconf 2.53 for Bobot++ 2.1.1CVS.
hunk ./configure 259
-PACKAGE_VERSION='2.1CVS'
-PACKAGE_STRING='Bobot++ 2.1CVS'
+PACKAGE_VERSION='2.1.1CVS'
+PACKAGE_STRING='Bobot++ 2.1.1CVS'
hunk ./configure 772
-\`configure' configures Bobot++ 2.1CVS to adapt to many kinds of systems.
+\`configure' configures Bobot++ 2.1.1CVS to adapt to many kinds of systems.
hunk ./configure 834
-     short | recursive ) echo "Configuration of Bobot++ 2.1CVS:";;
+     short | recursive ) echo "Configuration of Bobot++ 2.1.1CVS:";;
hunk ./configure 923
-Bobot++ configure 2.1CVS
+Bobot++ configure 2.1.1CVS
hunk ./configure 938
-It was created by Bobot++ $as_me 2.1CVS, which was
+It was created by Bobot++ $as_me 2.1.1CVS, which was
hunk ./configure 1503
-VERSION=2.1.0CVS
+VERSION=2.1.1CVS
hunk ./configure 4781
-This file was extended by Bobot++ $as_me 2.1CVS, which was
+This file was extended by Bobot++ $as_me 2.1.1CVS, which was
hunk ./configure 4843
-Bobot++ config.status 2.1CVS
+Bobot++ config.status 2.1.1CVS
hunk ./configure 5936
-This file was extended by Bobot++ $as_me 2.1CVS, which was
+This file was extended by Bobot++ $as_me 2.1.1CVS, which was
hunk ./configure 5998
-Bobot++ config.status 2.1CVS
+Bobot++ config.status 2.1.1CVS
hunk ./configure 7092
-This file was extended by Bobot++ $as_me 2.1CVS, which was
+This file was extended by Bobot++ $as_me 2.1.1CVS, which was
hunk ./configure 7154
-Bobot++ config.status 2.1CVS
+Bobot++ config.status 2.1.1CVS
hunk ./configure.ac 4
-AC_INIT([Bobot++], [2.1CVS], [clinton@unknownlamer.org])
-AM_INIT_AUTOMAKE([Bobot++], [2.1.0CVS])
+AC_INIT([Bobot++], [2.1.1CVS], [clinton@unknownlamer.org])
+AM_INIT_AUTOMAKE([Bobot++], [2.1.1CVS])
hunk ./source/Bot.C 20
+#include <algorithm>
hunk ./source/Bot.C 671
-  for_each (userFunctions.begin (),
+  std::for_each (userFunctions.begin (),
hunk ./source/Interp.C 52
-//  scm_primitive_load_path(scm_makfrom0str("ice-9/boot-9.scm"));
+  // Hooks
+  scm_c_define ("bot:exit-hook", scm_make_hook (scm_long2num (0)));
hunk ./source/Interp.C 170
-{ }
+{ 
+  scm_c_run_hook (gh_lookup ("bot:exit-hook"), SCM_EOL);
+}
hunk ./source/Parser.C 883
-// struct userFunctionsStruct userFunctionsInit[] = {
-//   {
-//    "ACTION", UserCommands::Action, User::USER, true}
-//   ,
-//   {
-//    "ADDUSER", UserCommands::AddUser, User::FRIEND, false}
-//   ,
-//   {
-//    "ADDSERVER", UserCommands::AddServer, User::FRIEND, false}
-//   ,
-//   {
-//    "ADDSHIT", UserCommands::AddShit, User::FRIEND, false}
-//   ,
-//   {
-//    "ALIAS", UserCommands::Alias, User::MASTER, false}
-//   ,
-//   {
-//    "BAN", UserCommands::Ban, User::USER, true}
-//   ,
-//   {
-//    "BANLIST", UserCommands::BanList, User::USER, true}
-//   ,
-//   //  { "CHANGELEVEL", UserCommands::ChangeLevel, User::FRIEND,       false },
-//   {
-//    "CHANNELS", UserCommands::Channels, User::FRIEND, false}
-//   ,
-//   {
-//    "CYCLE", UserCommands::Cycle, User::FRIEND, true}
-//   ,
-//   {
-//    "DCCLIST", UserCommands::DCCList, User::FRIEND, false}
-//   ,
-//   {
-//    "DEBAN", UserCommands::Deban, User::USER, true}
-//   ,
-//   {
-//    "DELSERVER", UserCommands::DelServer, User::FRIEND, false}
-//   ,
-//   {
-//    "DELUSER", UserCommands::DelUser, User::FRIEND, false}
-//   ,
-//   {
-//    "DELSHIT", UserCommands::DelShit, User::FRIEND, false}
-//   ,
-//   {
-//    "DEOP", UserCommands::Deop, User::TRUSTED_USER, true}
-//   ,
-//   {
-//    "DIE", UserCommands::Die, User::MASTER, false}
-//   ,
-//   {
-//    "DO", UserCommands::Do, User::MASTER, false}
-//   ,
-// #ifdef USESCRIPTS
-//   {
-//    "EXECUTE", UserCommands::Execute, User::MASTER, false}
-//   ,
-// #endif
-//   {
-//    "HELP", UserCommands::Help, User::NONE, false}
-//   ,
-//   {
-//    "IDENT", UserCommands::Ident, User::NONE, true}
-//   ,
-//   {
-//    "INVITE", UserCommands::Invite, User::USER, true}
-//   ,
-//   {
-//    "JOIN", UserCommands::Join, User::FRIEND, false}
-//   ,
-//   {
-//    "KEEP", UserCommands::Keep, User::FRIEND, true}
-//   ,
-//   {
-//    "KICK", UserCommands::Kick, User::USER, true}
-//   ,
-//   {
-//    "KICKBAN", UserCommands::KickBan, User::USER, true}
-//   ,
-//   {
-//    "LOAD", UserCommands::Load, User::FRIEND, false}
-//   ,
-// #ifdef USESCRIPTS
-//   {
-//    "LOADSCRIPT", UserCommands::LoadScript, User::MASTER, false}
-//   ,
-// #endif
-//   {
-//    "LOCK", UserCommands::Lock, User::FRIEND, true}
-//   ,
-//   {
-//    "MODE", UserCommands::Mode, User::FRIEND, true}
-//   ,
-//   {
-//    "MSG", UserCommands::Msg, User::USER, false}
-//   ,
-//   {
-//    "NAMES", UserCommands::Names, User::USER, true}
-//   ,
-//   {
-//    "NEXTSERVER", UserCommands::NextServer, User::FRIEND, false}
-//   ,
-//   {
-//    "NICK", UserCommands::Nick, User::FRIEND, false}
-//   ,
-//   {
-//    "NSLOOKUP", UserCommands::NsLookup, User::USER, false}
-//   ,
-//   {
-//    "OP", UserCommands::Op, User::TRUSTED_USER, true}
-//   ,
-//   {
-//    "PART", UserCommands::Part, User::FRIEND, true}
-//   ,
-//   {
-//    "PASSWORD", UserCommands::Password, User::USER, true}
-//   ,
-//   {
-//    "RECONNECT", UserCommands::Reconnect, User::FRIEND, false}
-//   ,
-//   {
-//    "RSPYMESSAGE", UserCommands::RSpyMessage, User::USER, false}
-//   ,
-//   {
-//    "SAVE", UserCommands::Save, User::FRIEND, false}
-//   ,
-//   {
-//    "SAY", UserCommands::Say, User::USER, true}
-//   ,
-//   {
-//    "SERVER", UserCommands::Server, User::FRIEND, false}
-//   ,
-//   {
-//    "SERVERLIST", UserCommands::ServerList, User::FRIEND, false}
-//   ,
-//   {
-//    "SETVERSION", UserCommands::SetVersion, User::MASTER, false}
-//   ,
-//   {
-//    "SHITLIST", UserCommands::ShitList, User::FRIEND, false}
-//   ,
-//   {
-//    "SPYLIST", UserCommands::SpyList, User::USER, false}
-//   ,
-//   {
-//    "SPYMESSAGE", UserCommands::SpyMessage, User::USER, false}
-//   ,
-//   {
-//    "STATS", UserCommands::Stats, User::FRIEND, true}
-//   ,
-//   {
-//    "TBAN", UserCommands::TBan, User::USER, true}
-//   ,
-//   {
-//    "TKBAN", UserCommands::TKBan, User::USER, true}
-//   ,
-//   {
-//    "TOPIC", UserCommands::Topic, User::USER, true}
-//   ,
-//   {
-//    "UNLOCK", UserCommands::Unlock, User::FRIEND, true}
-//   ,
-//   {
-//    "USERLIST", UserCommands::UserList, User::FRIEND, false}
-//   ,
-//   {
-//    "WHO", UserCommands::Who, User::NONE, true}
-//   ,
-//   {
-//    "WHOIS", UserCommands::Whois, User::FRIEND, true}
-//   ,
-//   {
-//    "", 0, 0, false}
-// };
}