WriteMode(modes.c_str(),flags,"%s",text.c_str());
}
-chanrec* Server::JoinUserToChannel(userrec* user, const std::string &cname, const std::string &key)
-{
- return add_channel(user,cname.c_str(),key.c_str(),false);
-}
-
-chanrec* Server::PartUserFromChannel(userrec* user, const std::string &cname, const std::string &reason)
-{
- return del_channel(user,cname.c_str(),reason.c_str(),false);
-}
-
chanuserlist Server::GetUsers(chanrec* chan)
{
chanuserlist userl;
userl.push_back(i->second);
return userl;
}
-void Server::ChangeUserNick(userrec* user, const std::string &nickname)
-{
- force_nickchange(user,nickname.c_str());
-}
-
-void Server::KickUser(userrec* source, userrec* target, chanrec* chan, const std::string &reason)
-{
- if (source)
- {
- chan->KickUser(source, target, reason.c_str());
- }
- else
- {
- chan->ServerKickUser(target, reason.c_str(), true);
- }
-}
-
-void Server::QuitUser(userrec* user, const std::string &reason)
-{
- kill_link(user,reason.c_str());
-}
bool Server::IsUlined(const std::string &server)
{
}
}
-void Server::SendChannelServerNotice(const std::string &ServName, chanrec* Channel, const std::string &text)
-{
- WriteChannelWithServ_NoFormat((char*)ServName.c_str(), Channel, text.c_str());
-}
-
-void Server::SendChannel(userrec* User, chanrec* Channel, const std::string &s, bool IncludeSender)
-{
- if (IncludeSender)
- {
- WriteChannel_NoFormat(Channel,User,s.c_str());
- }
- else
- {
- ChanExceptSender_NoFormat(Channel,User,0,s.c_str());
- }
-}
-
bool Server::CommonChannels(userrec* u1, userrec* u2)
{
return (common_channels(u1,u2) != 0);
std::string oldnick = alive->nick;
std::string oldhost = alive->host;
std::string oldident = alive->ident;
- kill_link(alive,message.c_str());
+ userrec::QuitUser(alive,message.c_str());
if (find(local_users.begin(),local_users.end(),alive) != local_users.end())
{
local_users.erase(find(local_users.begin(),local_users.end(),alive));