From: Borrillis <bor...@us...> - 2004-12-07 02:48:11
|
Update of /cvsroot/planeshift/planeshift/src/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32487/src/client Modified Files: cmdusers.cpp Log Message: - AdvisorManager fixes/changes Index: cmdusers.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/cmdusers.cpp,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** cmdusers.cpp 16 Nov 2004 07:28:47 -0000 1.74 --- cmdusers.cpp 7 Dec 2004 02:48:00 -0000 1.75 *************** *** 80,85 **** cmdsource->Subscribe("/clear", this); cmdsource->Subscribe("/advisormode", this); ! //cmdsource->Subscribe("/advisor", this); ! //cmdsource->Subscribe("/advice", this); cmdsource->Subscribe("/train", this); cmdsource->Subscribe("/quests", this); --- 80,86 ---- cmdsource->Subscribe("/clear", this); cmdsource->Subscribe("/advisormode", this); ! cmdsource->Subscribe("/list_advice_requests", this); ! cmdsource->Subscribe("/advisor", this); ! cmdsource->Subscribe("/advice", this); cmdsource->Subscribe("/train", this); cmdsource->Subscribe("/quests", this); *************** *** 129,133 **** cmdsource->Unsubscribe("/loot", this ); cmdsource->Unsubscribe("/clear", this ); ! cmdsource->Unsubscribe("/advisormode",this ); cmdsource->Unsubscribe("/train", this ); cmdsource->Unsubscribe("/quests", this ); --- 130,137 ---- cmdsource->Unsubscribe("/loot", this ); cmdsource->Unsubscribe("/clear", this ); ! cmdsource->Unsubscribe("/advisormode", this ); ! cmdsource->Unsubscribe("/list_advice_requests", this ); ! cmdsource->Unsubscribe("/advisor", this ); ! cmdsource->Unsubscribe("/advice", this ); cmdsource->Unsubscribe("/train", this ); cmdsource->Unsubscribe("/quests", this ); *************** *** 313,325 **** return NULL; } else if (words[0] == "/advisor" ) { ! //psAdviceRequestMessage advicemsg(cmd); ! //msgqueue->SendMessage(advicemsg.msg); } else if ( words[0] == "/advice") { ! //psAdviceResponseMessage advicemsg(cmd); ! //msgqueue->SendMessage(advicemsg.msg); } else --- 317,362 ---- return NULL; } + else if (words[0] == "/advisormode" ) + { + csString pPerson = ""; + csString pText = ""; + + if ( words.GetCount() > 1 ) + pText = words.GetTail( 1 ); + + psAdviceMessage advice(0,words[0],pPerson, pText); + msgqueue->SendMessage(advice.msg); + return NULL; + } + else if (words[0] == "/list_advice_requests" ) + { + csString pPerson = ""; + csString pText = ""; + + psAdviceMessage advice(0,words[0],pPerson, pText); + msgqueue->SendMessage(advice.msg); + return NULL; + } else if (words[0] == "/advisor" ) { ! csString pPerson = ""; ! csString pText( words.GetTail( 1 ) ); ! ! psAdviceMessage advice(0,words[0],pPerson, pText); ! msgqueue->SendMessage(advice.msg); ! return NULL; } else if ( words[0] == "/advice") { ! csString pPerson( words[1] ); ! csString pText; ! ! if (words.GetCount() == 2) ! return "You must enter the text. e.g /Advice [user] [text]"; ! pText = words.GetTail(2); ! ! psAdviceMessage advice(0,words[0],pPerson, pText); ! msgqueue->SendMessage(advice.msg); ! return NULL; } else |