mirror of
				https://github.com/reality/dbot.git
				synced 2025-11-04 03:57:31 +01:00 
			
		
		
		
	provisional api functionality for kicking and banning [#261]
This commit is contained in:
		
							parent
							
								
									c813f6087c
								
							
						
					
					
						commit
						8fcd19cca9
					
				@ -50,6 +50,16 @@ var kick = function(dbot) {
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    this.commands = commands;
 | 
			
		||||
 | 
			
		||||
    this.api = {
 | 
			
		||||
        'ban': function(server, user, channel) {
 | 
			
		||||
            dbot.instance.connections[server].send('MODE ' + channel + ' +b ' + user + '!*@*');
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        'kick': function(server, user, channel, msg) {
 | 
			
		||||
            dbot.instance.connections[server].send('KICK ' + channel + ' ' + event.user + ' :' + msg);
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    this.listener = function(event) {
 | 
			
		||||
       if(event.kickee == dbot.config.name) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user