Compare commits
	
		
			1 commit
		
	
	
		
			3bbccb94ab
			...
			08788c827e
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 08788c827e | 
					 4 changed files with 6 additions and 7 deletions
				
			
		
							
								
								
									
										2
									
								
								etc/api
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								etc/api
									
										
									
									
									
								
							|  | @ -1 +1 @@ | |||
| Subproject commit fefafd4923e824cb5a7f762c7e65d24cdc1f8d87 | ||||
| Subproject commit e8a127093213a52b0f8513f72fe7c0566b786158 | ||||
|  | @ -39,11 +39,11 @@ return { | |||
|       api = owner and C.api or nil, | ||||
|     } | ||||
|     for k,v in pairs(env) do t[k] = v end | ||||
|     local e, err = load(C.api.unparseArgs(msg.args), 'eval', 't', t) | ||||
|     local e, err = load(table.concat(msg.args, ' '), 'eval', 't', t) | ||||
|     xpcall(function() | ||||
|       if err then error(err) end | ||||
|       e = tostring(e() or '...') | ||||
|     end, function(err) e = err end) | ||||
|     C.api:send(msg, s .. '\n' .. e) | ||||
|   end | ||||
| } | ||||
| } | ||||
|  | @ -9,10 +9,10 @@ return { | |||
|     local path = 'src.'..cat..'.'..sub | ||||
|     C.api:off(package.loaded[path]) | ||||
|     package.loaded[path] = nil | ||||
|     local suc, m = pcall(require, path) | ||||
|     local err, m = pcall(require, path) | ||||
| 
 | ||||
|     if not suc then return C.api:reply(msg, 'Reload failed. ' .. m) | ||||
|     elseif cat == 'events' then C.api:on(sub, m) | ||||
|     if not err then return C.api:reply(msg, 'Reload failed. ' .. m) | ||||
|     elseif cat == 'events' then C.api:off(m); C.api:on(sub, m) | ||||
|     elseif cat == 'cmds'   then C.cmds[sub] = m | ||||
|     elseif cat == 'parts'  then m(C) | ||||
|     end | ||||
|  |  | |||
|  | @ -15,7 +15,6 @@ | |||
|     api:send(msg, C.locale:get('error', 'adm_cmd', l)) | ||||
| 
 | ||||
|   else | ||||
|     if cmd.useQArgs then msg.args = api.parseArgs(api.unparseArgs(msg.args)) end | ||||
|     msg.loc = C.locale:get('cmds', msg.cmd, l) | ||||
|     local succ, err = pcall(cmd.run, C, msg, owner) | ||||
|     if not succ then | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue