[[project @ 2002-08-18 21:32:48 by unknown_lamer] unknown_lamer**20020818213249 You can now talk to the bot using bot:dcc-chat-send ] { hunk ./ChangeLog 1 +2002-08-18 Clinton Ebadi + + * bobot++.texinfo (Hook Types): Fixed a typo (I wrote + user!nick@host instead of the correct nick!user@host). + + * source/Interp.C (Startup): Register bot:DCC-chat-send + + * source/ScriptCommands.C (sendDCCChatMessage): Added method again + hunk ./NEWS 20 -- DCC CHAT now "works." You can connect to the bot and talk to to it, - but it doesn't do anything useful. +- DCC CHAT now "works." You can connect to the bot and talk to to it + and use Scheme hooks to talk to the user. +- New hooks: hooks/dcc/chat-begin and hooks/dcc/chat-message. These + are called when a new DCC Chat begin and when the user sends a + message. +- New Function: bot:dcc-chat-send TO MESSAGE, sends a MESSAGE to the + person at address TO hunk ./acinclude.m4 1 -pr# +# hunk ./bobot++.info 247 - the action in the form `USER ! NICK @ HOST' (without the + the action in the form `NICK ! USER @ HOST' (without the hunk ./bobot++.info 365 + * `hooks/dcc/begin' + - This hook is triggered when a user begins a DCC CHAT with the + bot. + + - FROM + - FROM: This is the user's address in the form + `nick!user@host'. + + * `hooks/dcc/message' + - This hook is triggered when a user sends a message to the bot + through a DCC CHAT + + - FROM MESSAGE + - FROM: This is the user's address in the form + `nick!user@host'. + + - MESSAGE: This is the message the user sent to the bot. hunk ./bobot++.info 496 +* hooks/dcc/begin: Hook Types. +* hooks/dcc/message: Hook Types. hunk ./bobot++.info 535 -Node: Scheme User Levels10905 -Node: Sending Messages12034 -Node: High Level Message Functions12631 -Node: Low Level Message Functions12845 -Node: Misc Scripting Stuff13598 -Node: Concept Index14017 -Node: Function Index14199 -Node: Variable Index14460 +Node: Scheme User Levels11439 +Node: Sending Messages12568 +Node: High Level Message Functions13165 +Node: Low Level Message Functions13379 +Node: Misc Scripting Stuff14132 +Node: Concept Index14551 +Node: Function Index14733 +Node: Variable Index14994 hunk ./bobot++.texinfo 272 -action in the form @samp{@var{user} ! @var{nick} @@ @var{host}} +action in the form @samp{@var{nick} ! @var{user} @@ @var{host}} hunk ./bobot++.texinfo 536 +@item +@vindex hooks/dcc/begin +@code{hooks/dcc/begin} +@itemize @minus +@item +This hook is triggered when a user begins a DCC CHAT with the bot. +@item +@var{FROM} +@itemize @minus +@item +@var{FROM}: This is the user's address in the form +@samp{nick!user@@host}. +@end itemize +@end itemize + +@item +@vindex hooks/dcc/message +@code{hooks/dcc/message} +@itemize @minus +@item +This hook is triggered when a user sends a message to the bot through +a DCC CHAT +@item +@var{FROM} @var{MESSAGE} +@itemize @minus +@item +@var{FROM}: This is the user's address in the form +@samp{nick!user@@host}. +@item +@var{MESSAGE}: This is the message the user sent to the bot. +@end itemize +@end itemize hunk ./source/Interp.C 163 + + scm_c_define_gsubr ("bot:DCC-chat-send", 2, 0, 0, + (SCMFunc)ScriptCommands::sendDCCChatMessage); hunk ./source/ScriptCommands.C 32 +#include "DCCManager.H" hunk ./source/ScriptCommands.C 589 + +SCM +ScriptCommands::sendDCCChatMessage (SCM to, SCM message) +{ + + return SCM_BOOL (Interp::bot->dccConnections->sendMessage + (Utils::scm2String (to), + Utils::scm2String (message))); +} hunk ./source/ScriptCommands.H 80 + + // DCC CHAT + static SCM sendDCCChatMessage (SCM, SCM); }