|
@@ -81,18 +81,6 @@ def displaying(c, user)
|
|
|
|
|
|
end
|
|
end
|
|
|
|
|
|
-
|
|
|
|
-def write_user(user, input)
|
|
|
|
-
|
|
|
|
- if online_users.user(user)
|
|
|
|
- sometime = "#{Time.now.utc.strftime("%Y-%m-%d %H:%M:%S %z")}"
|
|
|
|
- line = "#{sometime}: #{input}"
|
|
|
|
-
|
|
|
|
- $display_queue[user].push(line)
|
|
|
|
- end
|
|
|
|
-end
|
|
|
|
-
|
|
|
|
-
|
|
|
|
def kill_conn(c, user, t_display)
|
|
def kill_conn(c, user, t_display)
|
|
sleep 0.5
|
|
sleep 0.5
|
|
# delete the key out off $display_queue
|
|
# delete the key out off $display_queue
|
|
@@ -121,6 +109,17 @@ def online_users
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
+def write_user(user, input)
|
|
|
|
+
|
|
|
|
+ if online_users.user(user)
|
|
|
|
+ sometime = "#{Time.now.utc.strftime("%Y-%m-%d %H:%M:%S %z")}"
|
|
|
|
+ line = "#{sometime}: #{input}"
|
|
|
|
+
|
|
|
|
+ $display_queue[user].push(line)
|
|
|
|
+ end
|
|
|
|
+end
|
|
|
|
+
|
|
|
|
+
|
|
def write_role(role, input, *exempts)
|
|
def write_role(role, input, *exempts)
|
|
|
|
|
|
#find users with role
|
|
#find users with role
|
|
@@ -192,7 +191,7 @@ def inputting(user, input)
|
|
|
|
|
|
elsif cmd == "WHO"
|
|
elsif cmd == "WHO"
|
|
online_users.each {|ouser|
|
|
online_users.each {|ouser|
|
|
- write_user(user, "WHO_RE #{ouser} ROLES: #{$user_roles[user].join(", ")}")
|
|
|
|
|
|
+ write_user(user, "WHO_RE #{ouser} ROLES: #{$user_roles[ouser].join(", ")}")
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|