devzone command v2
This commit is contained in:
		
							parent
							
								
									4e5ef34d64
								
							
						
					
					
						commit
						8de77f2fd0
					
				@ -34,17 +34,26 @@ bool SparrowModule::messageHandler(Message msg)
 | 
				
			|||||||
        else if(msg.args.startsWith("!devzone"))
 | 
					        else if(msg.args.startsWith("!devzone"))
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            QStringList paramList = msg.args.split(' ');
 | 
					            QStringList paramList = msg.args.split(' ');
 | 
				
			||||||
            if(paramList.size() < 2)
 | 
					            if(paramList.size() == 1)
 | 
				
			||||||
                return false;
 | 
					                answer = say("devzone : http://epicsparrow.com/en/devzone");
 | 
				
			||||||
            QString param = paramList[1];
 | 
					            else if(paramList.size() > 2)
 | 
				
			||||||
            if(param.compare("whiteboard") == 0)
 | 
					                answer = say("available links : lino, whiteboard, gitlab");
 | 
				
			||||||
                answer = say("whiteboard : http://webwhiteboard.com/#7w9fcmeg");
 | 
					 | 
				
			||||||
            else if(param.compare("gitlab") == 0)
 | 
					 | 
				
			||||||
                answer = say("gitlab : https://git.epicsparrow.com");
 | 
					 | 
				
			||||||
            else if(param.compare("lino") == 0)
 | 
					 | 
				
			||||||
                answer = say("lino : http://linoit.com/groups/EpicSparrow/canvases/EpicSparrow");
 | 
					 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
                answer = say("available devzone links : lino, whiteboard, gitlab");
 | 
					            {
 | 
				
			||||||
 | 
					                QString param = paramList[1];
 | 
				
			||||||
 | 
					                if(param.compare("whiteboard") == 0)
 | 
				
			||||||
 | 
					                    answer = say("whiteboard : http://webwhiteboard.com/#7w9fcmeg");
 | 
				
			||||||
 | 
					                else if(param.compare("gitlab") == 0)
 | 
				
			||||||
 | 
					                    answer = say("gitlab : https://git.epicsparrow.com");
 | 
				
			||||||
 | 
					                else if(param.compare("lino") == 0)
 | 
				
			||||||
 | 
					                    answer = say("lino : http://linoit.com/groups/EpicSparrow/canvases/EpicSparrow");
 | 
				
			||||||
 | 
					                else if(param.compare("plop") == 0)
 | 
				
			||||||
 | 
					                    answer = say("plop : http://www.plop.org");
 | 
				
			||||||
 | 
					                else if(param.compare("pastebin") == 0)
 | 
				
			||||||
 | 
					                    answer = say("plop : http://www.pastebin.com");
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                    answer = say("%1 : https://www.google.fr/#q=%2").arg(param).arg(param);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user