//\r
function CommandParser()\r
{\r
- this.word = new Array;\r
+ //\83R\83}\83\93\83h\83\8a\83X\83g\82ð\95\\82·\r
+ //\83R\83}\83\93\83h\83\8a\83X\83g\82Ì\8ae\97v\91f\82É\82Ífunction(msg,word){}\82ð\92Ç\89Á\82µ\82È\82¯\82ê\82Î\82È\82ç\82È\82¢\r
+ //\97á\81j/test\83R\83}\83\93\83h\82ð\92Ç\89Á\r
+ //this.CommandList["test"] = function(msg,word){}\r
this.CommandList;\r
+ //\82Ç\82Ì\83R\83}\83\93\83h\82É\82à\8aY\93\96\82µ\82È\82¢\8e\9e\82É\8cÄ\82Ñ\82³\82ê\82é\8aÖ\90\94\r
this.DefaultCommand = function(msg)\r
{\r
return msg.message;\r
\r
this.parse = function(msg)\r
{\r
- this.word = msg.message.split(" ");\r
- if(this.CommandList[this.word[0]])\r
- return this.CommandList[this.word[0]](msg,this.word);\r
+ var word = msg.message.split(" ");\r
+ if(this.CommandList[word[0]])\r
+ return this.CommandList[word[0]](msg,word);\r
else\r
return this.DefaultCommand(msg);\r
}\r