String message)
{
sendPrivmsg(to, String("\001") + command + " " + message + "\001");
- // hook stuff (only get action for now)
- // I don't think it is useful to generate messages for other types
- // of CTCP stuff.
- puts (command);
#ifdef USESCRIPTS
if (command == "ACTION")
{
- Interp::bot->botInterp->RunHooks (Hook::ACTION,
- MNICK+ " " + to +
+ Interp::bot->botInterp->RunHooks (Hook::SEND_ACTION,
+ MNICK + " " + to +
" " + message,
scm_listify (Utils::
string2SCM (MNICK),
string2SCM (message),
SCM_UNDEFINED));
}
+ else
+ Interp::bot->botInterp->RunHooks (Hook::SEND_CTCP,
+ MNICK + " " + to + " " +
+ command + " " + message,
+ scm_listify (Utils::
+ string2SCM (MNICK),
+ Utils::
+ string2SCM (to),
+ Utils::
+ string2SCM
+ (command),
+ Utils::
+ string2SCM (message),
+ SCM_UNDEFINED));
#endif
}
#ifdef USESCRIPTS
if (message[0] != '\001')
if (Utils::isChannel (dest))
- Interp::bot->botInterp->RunHooks (Hook::PUBLIC,
+ Interp::bot->botInterp->RunHooks (Hook::SEND_PUBLIC,
Interp::bot->nickName + " " + dest +
" " + message,
scm_listify (Utils::
string2SCM
(message), SCM_UNDEFINED));
else
- Interp::bot->botInterp->RunHooks (Hook::MESSAGE,
+ Interp::bot->botInterp->RunHooks (Hook::SEND_MESSAGE,
Interp::bot->nickName + " " +
message,
scm_listify (Utils::