add notice handling

master
Jordan Koch 2019-02-16 11:18:25 -05:00
부모 4a0d26cd47
커밋 7ec28b4bde
1개의 변경된 파일49개의 추가작업 그리고 0개의 파일을 삭제

파일 보기

@ -1303,6 +1303,25 @@ class CPushMod : public CModule
return CONTINUE;
}
/**
* Handle channel notices.
*
* @param nick Nick that sent the notice
* @param channel Channel the notice was sent to
* @param message Notice contents
*/
EModRet OnChanNotice(CNick& nick, CChan& channel, CString& message)
{
if (notify_channel(nick, channel, message))
{
CString title = "Channel Notice";
send_message(message, title, channel.GetName(), nick);
}
return CONTINUE;
}
/**
* Handle a private message.
*
@ -1339,6 +1358,24 @@ class CPushMod : public CModule
return CONTINUE;
}
/**
* Handle a private notice.
*
* @param nick Nick that sent the notice
* @param message Notice contents
*/
EModRet OnPrivNotice(CNick& nick, CString& message)
{
if (notify_pm(nick, message))
{
CString title = "Private Notice";
send_message(message, title, nick.GetNick(), nick);
}
return CONTINUE;
}
/**
* Handle a message sent by the user.
*
@ -1363,6 +1400,18 @@ class CPushMod : public CModule
return CONTINUE;
}
/**
* Handle a notice sent by the user.
*
* @param target Target channel or nick
* @param message Notice contents
*/
EModRet OnUserNotice(CString& target, CString& message)
{
last_reply_time[target] = last_active_time[target] = idle_time = time(NULL);
return CONTINUE;
}
/**
* Handle the user joining a channel.
*