if (currchar[i]->isCounselor() && perm[i])
if ( perm[i] && currchar[i]->isCounselor() )
bool InputSpeech(const QString& comm, cChar* pPlayer, UOXSOCKET s)//bool InputSpeech(char* comm, cChar* pPlayer, UOXSOCKET s){	int i;	if (pPlayer->inputmode != cChar::enNone)		// Speech is directly used to set a member	{		P_ITEM pTarget = FindItemBySerial(pPlayer->inputitem);		bool ok;		switch (pPlayer->inputmode)		{		case cChar::enPricing:// Pricing an item //PlayerVendors			i = comm.toInt(&ok);			if (ok)			{				pTarget->value = i;				sysmessage(s, "This item's price has been set to %i.", i);			}			else 			{				sysmessage(s, "No price entered, ignored.");			}			pPlayer->inputmode = cChar::enDescription;			sysmessage(s, "Enter a description for this item.");			return true;		case cChar::enDescription:// Describing an item			pTarget->desc = comm.latin1();			sysmessage(s, QString("This item is now described as %1. ").arg(comm).latin1());			pPlayer->inputmode = cChar::enNone;			pPlayer->inputitem = INVALID_SERIAL;			return true;		case cChar::enRenameRune:			pTarget->name = string("Rune to ") + comm.latin1();			sysmessage(s, "Rune renamed to: Rune to %s", comm.latin1());			pPlayer->inputmode = cChar::enNone;			pPlayer->inputitem = INVALID_SERIAL;			return true;		case cChar::enNameDeed: // eagle rename deed			{				//char temp[50] = {0,};				//strncpy(temp, comm, 49);				//pPlayer->name = temp;				pPlayer->name = comm ;				sysmessage(s, "Your new name is: %s", comm.latin1());				pPlayer->inputmode = cChar::enNone;				pPlayer->inputitem = INVALID_SERIAL;			}			return true;		case cChar::enHouseSign: // house sign rename			{				//char temp[50] = {0,};				//strncpy(temp, comm, 49);				//pTarget->name = temp;				pTarget->name = comm;				sysmessage(s, "Renamed to: %s", comm.latin1());				pPlayer->inputmode = cChar::enNone;				pPlayer->inputitem=INVALID_SERIAL;			}			return true;		case cChar::enPageGM:			{				gmpages[pPlayer->playercallnum].reason = comm;				sprintf(temp, "GM Page from %s [%x]: %s",pPlayer->name.c_str(), pPlayer->serial, comm.latin1());				int x = 0;				for (i = 0; i < now; i++)				{					if ((currchar[i]->isGM()) && perm[i])					{						x = 1;						sysmessage(i, temp);					}				}				if (x == 1)					sysmessage(s, "Available Game Masters have been notified of your request.");				else 					sysmessage(s, "There was no Game Master available, page queued.");				pPlayer->inputmode = cChar::enNone;				return true;			}		case cChar::enPageCouns:			{				counspages[pPlayer->playercallnum].reason = comm;				sprintf(temp, "Counselor Page from %s [%x]: %s", pPlayer->name.c_str(), pPlayer->serial, comm.latin1());				int x = 0;				for (i = 0; i < now; i++)				{					if (currchar[i]->isCounselor() && perm[i])					{						x = 1;						sysmessage(i, (char*)temp);					}					}				if (x == 1)					sysmessage(s, "Available Counselors have been notified of your request.");				else	 					sysmessage(s, "There was no Counselor available to take your call.");				pPlayer->inputmode = cChar::enNone;				return true;			}		default:			break;	// do nothing		}	}	return false;}