[7716] Fixed some typos and possible crashes.

This commit is contained in:
AlexDereka 2009-04-26 18:49:00 +04:00
parent c2e6dd20dd
commit c9d51a6dc7
25 changed files with 281 additions and 263 deletions

View file

@ -298,10 +298,11 @@ void Channel::Password(uint64 p, const char *pass)
void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
{
uint32 sec = 0;
Player *plr = objmgr.GetPlayer(p);
if(plr)
sec = plr->GetSession()->GetSecurity();
if (!plr)
return;
uint32 sec = plr->GetSession()->GetSecurity();
if(!IsOn(p))
{
@ -366,10 +367,11 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
void Channel::SetOwner(uint64 p, const char *newname)
{
uint32 sec = 0;
Player *plr = objmgr.GetPlayer(p);
if(plr)
sec = plr->GetSession()->GetSecurity();
if (!plr)
return;
uint32 sec = plr->GetSession()->GetSecurity();
if(!IsOn(p))
{