SCM_STRING_COERCE_0TERMINATION_X (command);
std::string ccommand = SCM_STRING_CHARS (command);
- unsigned int llevel = scm_num2uint (level, 0, "ScriptCommands::ChangeCommandLevel");
+ unsigned int llevel = scm_num2uint
+ (level, 0, "ScriptCommands::ChangeCommandLevel");
if (llevel > 4)
return SCM_BOOL_F;
return SCM_BOOL_T;
}
+SCM
+ScriptCommands::CTCP(SCM to, SCM command , SCM message)
+{
+ VERIFY_STRING(to);
+ VERIFY_STRING(command);
+ VERIFY_STRING(message);
+
+ Commands::CTCP (Interp::bot, Utils::scm2str (to),
+ Utils::scm2str (command),
+ Utils::scm2str (message));
+
+ return SCM_UNSPECIFIED;
+}
+
+SCM
+ScriptCommands::CTCPReply (SCM to, SCM command , SCM message)
+{
+ VERIFY_STRING(to);
+ VERIFY_STRING(command);
+ VERIFY_STRING(message);
+
+ Commands::CTCPReply (Interp::bot, Utils::scm2str (to),
+ Utils::scm2str (command),
+ Utils::scm2str (message));
+
+ return SCM_UNSPECIFIED;
+}
+
SCM
ScriptCommands::Cycle(SCM channel)
{
return scm_long2num(m.getCode());
}
+SCM
+ScriptCommands::Who (SCM target)
+{
+ VERIFY_STRING (target);
+
+ Message m = Commands::Who (Interp::bot, Utils::scm2str (target));
+
+ return scm_long2num (m.getCode ());
+}
+
+SCM
+ScriptCommands::Whois (SCM nick)
+{
+ VERIFY_STRING (nick);
+
+ Message m = Commands::Whois (Interp::bot, Utils::scm2str (nick));
+
+ return scm_long2num (m.getCode ());
+}
+
SCM
ScriptCommands::getNickname(void)
{
Utils::scm2str (message)));
}
-// Message sending
-// FIXME: write these
-
-#define IQUEUE Interp::bot->serverConnection->queue
-SCM
-ScriptCommands::sendCTCP(SCM to, SCM command , SCM message)
-{
- VERIFY_STRING(to);
- VERIFY_STRING(command);
- VERIFY_STRING(message);
- Commands::CTCP (Interp::bot, Utils::scm2str (to),
- Utils::scm2str (command),
- Utils::scm2str (message));
- return SCM_UNSPECIFIED;
-}
-
-SCM
-ScriptCommands::sendCTCPReply (SCM to, SCM command , SCM message)
-{
- VERIFY_STRING(to);
- VERIFY_STRING(command);
- VERIFY_STRING(message);
-
- Commands::CTCPReply (Interp::bot, Utils::scm2str (to),
- Utils::scm2str (command),
- Utils::scm2str (message));
-
- return SCM_UNSPECIFIED;
-}
#endif