Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
double-fault committed Mar 30, 2017
1 parent 22133e9 commit be1349e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 0 additions & 1 deletion Sources/SwiftChatSE/CommandCheckPrivileges.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public class CommandCheckPrivileges: Command {
return ["privileges", "amiprivileged", "am i privileged", "my privileges", "check privileges"]
}


override public func run() throws {
let privs = message.user.privileges.names
if privs.isEmpty {
Expand Down
18 changes: 16 additions & 2 deletions Sources/SwiftChatSE/CommandKill.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,28 @@ import Foundation

open class CommandKill: Command {
override open class func usage() -> [String] {
return ["kill"]
return ["kill ...", "crash ...", "die ..."]
}

override open class func privileges() -> ChatUser.Privileges {
return [.owner]
}

override open func run() throws {
abort()
if (arguments.count == 0) {
abort()
}

let argLocation = arguments.joined(separator: " ").lowercased()

if (userLocation == "<unknown>") {
reply ("The current instance's location is unknown.")
return
}

if (userLocation.lowercased() == argLocation)
{
abort()
}
}
}

0 comments on commit be1349e

Please sign in to comment.