十七、2008年04月15日
作者:青青子衿
email:[email protected]
1、class CRSALib 類,主要支持RSA數據加密,但護體使用方法還不清楚,需要進一步工作,暫不詳細描述。
2、CsdbotCompat 類
class CsdbotCompat : public CCommandHandler
{
public:
void Init(); // Do initialization here
int Compat(char *a[256], bool notice, bool silent); // Insert your sdbot stuff here
bool HandleCommand(CMessage *pMsg);
command m_cmdTest;
};
其中包括三個成員函數,一個成員變量。
3、Init() 函數
///////////////////////////////////////////////////////
//
//函數功能:類的初始化函數
//參數: 無
//返回值: void
//
///////////////////////////////////////////////////
void CsdbotCompat::Init()
{
//向命令列表中添加sd.test指令
g_cMainCtrl.m_cCommands.RegisterCommand(&m_cmdTest, "sd.test", "test", this);
}
4、Compat(char *a[256], bool notice, bool silent) 函數
///////////////////////////////////////////////////////////////////
//
//函數功能:留了一個接口,但似乎沒有實現任何功能。
// 本人推測這個類是爲了給高級用戶進一步擴展bot命令集
// 留的接口,用戶可以自己來實現,新功能。
//參數: char *a[256]
// bool notice 是否notice模式發送
// bool silent 是否使用靜默模式通訊
//返回值: int 返回值是0
//
//////////////////////////////////////////////////////////////////////////
int CsdbotCompat::Compat(char *a[256], bool notice, bool silent)
{
char sendbuf[512];
return 0;
}
5、HandleCommand(CMessage *pMsg) 函數
///////////////////////////////////////////////////////////////////////
//
//函數功能:bot指令處理函數,還沒有具體實現
//參數: CMessage *pMsg 接收到的消息
//返回值: bool,目前只返回false。
//
//////////////////////////////////////////////////////////////////////
bool CsdbotCompat::HandleCommand(CMessage *pMsg)
{
return false;
}