Class: Libfchat::Fchat
- Inherits:
-
Object
- Object
- Libfchat::Fchat
- Defined in:
- lib/libfchat/fchat.rb
Instance Attribute Summary collapse
-
#chat_max ⇒ Object
readonly
Returns the value of attribute chat_max.
-
#clientname ⇒ Object
readonly
Returns the value of attribute clientname.
-
#friends ⇒ Object
Returns the value of attribute friends.
-
#ignore ⇒ Object
Returns the value of attribute ignore.
-
#lfrp_flood ⇒ Object
readonly
Returns the value of attribute lfrp_flood.
-
#lfrp_max ⇒ Object
readonly
Returns the value of attribute lfrp_max.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#me ⇒ Object
readonly
Returns the value of attribute me.
-
#msg_flood ⇒ Object
readonly
Returns the value of attribute msg_flood.
-
#ops ⇒ Object
Returns the value of attribute ops.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
-
#priv_max ⇒ Object
readonly
Returns the value of attribute priv_max.
-
#rooms ⇒ Object
Returns the value of attribute rooms.
-
#ticket ⇒ Object
readonly
Returns the value of attribute ticket.
-
#users ⇒ Object
Returns the value of attribute users.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#websocket ⇒ Object
Returns the value of attribute websocket.
Instance Method Summary collapse
-
#ACB(character) ⇒ Object
Performs an account ban against a characters account.
-
#AOP(character) ⇒ Object
Adds a character to the chat operator list.
-
#AWC(character) ⇒ Object
Requests a list of currently connected alts for a characters account.
-
#BRO(message) ⇒ Object
Broadcasts a message to all connections.
-
#CBL(channel) ⇒ Object
Request the channel banlist.
-
#CBU(channel, character) ⇒ Object
Bans a character from a channel.
-
#CCR(channel) ⇒ Object
Create an Ad-hoc Channel.
-
#CDS(channel, description) ⇒ Object
This command is used by an admin or channel owner to set a new channel description.
-
#CHA ⇒ Object
Request a list of all public channels.
-
#CIU(channel, character) ⇒ Object
Sends an invitation for a channel to a user.
-
#CKU(channel, character) ⇒ Object
Kick a user from a channel.
-
#COA(channel, character) ⇒ Object
Op a user in a channel.
-
#COL(channel) ⇒ Object
Request a list of channel ops.
-
#CRC(channel) ⇒ Object
Creates a global channel.
-
#CUB(channel, character) ⇒ Object
Unban a user from a channel.
-
#DOP(character) ⇒ Object
Request that a character be stripped of chatop status.
-
#FKS(kink, genders) ⇒ Object
Do a search for a kink with specific genders.
-
#got_ADL(message) ⇒ Object
Store list of ops.
-
#got_CDS(message) ⇒ Object
Store description for newly joined chatroom.
-
#got_COL(message) ⇒ Object
Store ops list for room.
-
#got_FLN(message) ⇒ Object
Handle user logging off.
-
#got_FRL(message) ⇒ Object
Store list of friends.
-
#got_ICH(message) ⇒ Object
Store userlist for newly joined chatroom.
-
#got_IDN(message) ⇒ Object
Know thyself.
-
#got_IGN(message) ⇒ Object
Store list of ignored users.
-
#got_JCH(message) ⇒ Object
Store data about newly joined chatroom.
-
#got_LCH(message) ⇒ Object
Handle user leaving chatroom.
-
#got_LIS(message) ⇒ Object
Store list of online users.
-
#got_NLN(message) ⇒ Object
Handle user logging on.
-
#got_PIN(message) ⇒ Object
Respond to keepalive ping messages.
-
#got_STA(message) ⇒ Object
Handle user changing status.
-
#got_VAR(message) ⇒ Object
Store server-side variables.
-
#IDN(account, character, ticket, cname = @clientname, cversion = @version, method = "ticket") ⇒ Object
This command is used to identify with the server.
-
#IGN(action, character) ⇒ Object
Deal with ignoring characters.
-
#initialize(clientname = "libfchat-ruby by Jippen Faddoul ( http://github.com/jippen/libfchat-ruby )", version = Libfchat::VERSION, level = Logger::DEBUG) ⇒ Fchat
constructor
Initialize the object with the name and version.
-
#IPB(character) ⇒ Object
Request that a character be IP banned.
-
#JCH(channel) ⇒ Object
Send a channel join request.
-
#KIK(character) ⇒ Object
Request a character to be kicked.
-
#KIN(character) ⇒ Object
Request a character’s list of kinks.
-
#LCH(channel) ⇒ Object
Leave a channel.
-
#login(server, account, password, character, timeout = 30) ⇒ Object
Login to fchat as a specific user, and start the event machine.
-
#method_missing(method_name, *args, &block) ⇒ Object
Some method_missing magic to make ruby handle just throwing around commands that may or may not exist.
-
#MSG(channel, message) ⇒ Object
Send a message to a channel.
-
#OPP ⇒ Object
List presence of ops in all rooms.
-
#ORS ⇒ Object
Request a list of open private rooms.
-
#parse_message(msg) ⇒ Object
Parse message received from server.
-
#PIN ⇒ Object
Respond to a ping request.
-
#PRI(recipient, message) ⇒ Object
Sends a prive message to another user.
-
#PRO(character) ⇒ Object
Do a profile request.
-
#RAN(channel) ⇒ Object
Advertises the first open private channel owned by the client in the given channel.
-
#RLL(channel, dice) ⇒ Object
Roll dice in a channel.
-
#RST(channel, status) ⇒ Object
Set a private room’s status to closed or open.
-
#RWD(character) ⇒ Object
Reward a user, for instance, for finding a bug.
-
#send_message(type, json) ⇒ Object
Generic message sender.
-
#STA(status, statusmsg) ⇒ Object
Request a new status to be set for your character.
-
#TMO(character, time, reason) ⇒ Object
Admin or chatop command to request a timeout for a user time must be a minimum of one minute, and maximum of 90 minutes.
-
#TPN(character, status) ⇒ Object
User x is typing/stopped typing/entered text for private messages.
-
#UBN(character) ⇒ Object
Unban a character.
Constructor Details
#initialize(clientname = "libfchat-ruby by Jippen Faddoul ( http://github.com/jippen/libfchat-ruby )", version = Libfchat::VERSION, level = Logger::DEBUG) ⇒ Fchat
Initialize the object with the name and version. Default to just identifying as the library
43 44 45 46 47 48 49 50 |
# File 'lib/libfchat/fchat.rb', line 43 def initialize(clientname="libfchat-ruby by Jippen Faddoul ( http://github.com/jippen/libfchat-ruby )",version=Libfchat::VERSION, level=Logger::DEBUG) @clientname = clientname @version = version @users = InsensitiveHash.new @rooms = InsensitiveHash.new @logger = Logger.new(STDOUT) @logger.level = level end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
Some method_missing magic to make ruby handle just throwing around commands that may or may not exist.
56 57 58 59 60 61 62 63 |
# File 'lib/libfchat/fchat.rb', line 56 def method_missing(method_name, *args, &block) # Try to handle all three-letter strings if method_name.to_s[4,7] =~ /[A-Z]{3}/ return nil else super(method_name,*args,&block) end end |
Instance Attribute Details
#chat_max ⇒ Object (readonly)
Returns the value of attribute chat_max.
25 26 27 |
# File 'lib/libfchat/fchat.rb', line 25 def chat_max @chat_max end |
#clientname ⇒ Object (readonly)
Returns the value of attribute clientname.
22 23 24 |
# File 'lib/libfchat/fchat.rb', line 22 def clientname @clientname end |
#friends ⇒ Object
Returns the value of attribute friends.
32 33 34 |
# File 'lib/libfchat/fchat.rb', line 32 def friends @friends end |
#ignore ⇒ Object
Returns the value of attribute ignore.
33 34 35 |
# File 'lib/libfchat/fchat.rb', line 33 def ignore @ignore end |
#lfrp_flood ⇒ Object (readonly)
Returns the value of attribute lfrp_flood.
28 29 30 |
# File 'lib/libfchat/fchat.rb', line 28 def lfrp_flood @lfrp_flood end |
#lfrp_max ⇒ Object (readonly)
Returns the value of attribute lfrp_max.
27 28 29 |
# File 'lib/libfchat/fchat.rb', line 27 def lfrp_max @lfrp_max end |
#logger ⇒ Object
Returns the value of attribute logger.
37 38 39 |
# File 'lib/libfchat/fchat.rb', line 37 def logger @logger end |
#me ⇒ Object (readonly)
Returns the value of attribute me.
23 24 25 |
# File 'lib/libfchat/fchat.rb', line 23 def me @me end |
#msg_flood ⇒ Object (readonly)
Returns the value of attribute msg_flood.
29 30 31 |
# File 'lib/libfchat/fchat.rb', line 29 def msg_flood @msg_flood end |
#ops ⇒ Object
Returns the value of attribute ops.
34 35 36 |
# File 'lib/libfchat/fchat.rb', line 34 def ops @ops end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
30 31 32 |
# File 'lib/libfchat/fchat.rb', line 30 def @permissions end |
#priv_max ⇒ Object (readonly)
Returns the value of attribute priv_max.
26 27 28 |
# File 'lib/libfchat/fchat.rb', line 26 def priv_max @priv_max end |
#rooms ⇒ Object
Returns the value of attribute rooms.
36 37 38 |
# File 'lib/libfchat/fchat.rb', line 36 def rooms @rooms end |
#ticket ⇒ Object (readonly)
Returns the value of attribute ticket.
18 19 20 |
# File 'lib/libfchat/fchat.rb', line 18 def ticket @ticket end |
#users ⇒ Object
Returns the value of attribute users.
35 36 37 |
# File 'lib/libfchat/fchat.rb', line 35 def users @users end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
21 22 23 |
# File 'lib/libfchat/fchat.rb', line 21 def version @version end |
#websocket ⇒ Object
Returns the value of attribute websocket.
19 20 21 |
# File 'lib/libfchat/fchat.rb', line 19 def websocket @websocket end |
Instance Method Details
#ACB(character) ⇒ Object
Performs an account ban against a characters account.
*This command requires chat op or higher.*
268 269 270 271 |
# File 'lib/libfchat/fchat.rb', line 268 def ACB(character) json = {:character => character} self.('ACB',json) end |
#AOP(character) ⇒ Object
Adds a character to the chat operator list.
*This command is admin only.*
277 278 279 280 |
# File 'lib/libfchat/fchat.rb', line 277 def AOP(character) json = {:character => character} self.('AOP',json) end |
#AWC(character) ⇒ Object
Requests a list of currently connected alts for a characters account.
*This command requires chat op or higher.*
286 287 288 289 |
# File 'lib/libfchat/fchat.rb', line 286 def AWC(character) json = {:character => character} self.('AWC',json) end |
#BRO(message) ⇒ Object
Broadcasts a message to all connections. *This command is admin only.*
294 295 296 297 |
# File 'lib/libfchat/fchat.rb', line 294 def BRO() json = {:message => } self.('AWC',json) end |
#CBL(channel) ⇒ Object
Request the channel banlist.
*This command requires channel op or higher.*
303 304 305 306 |
# File 'lib/libfchat/fchat.rb', line 303 def CBL(channel) json = {:channel => channel} self.('CBL',json) end |
#CBU(channel, character) ⇒ Object
Bans a character from a channel
*This command requires channel op or higher.*
312 313 314 315 316 |
# File 'lib/libfchat/fchat.rb', line 312 def CBU(channel,character) json = {:channel => channel, :character => character} self.('CBU',json) end |
#CCR(channel) ⇒ Object
Create an Ad-hoc Channel
320 321 322 323 |
# File 'lib/libfchat/fchat.rb', line 320 def CCR(channel) json = {:channel => channel} self.('CCR',json) end |
#CDS(channel, description) ⇒ Object
This command is used by an admin or channel owner to set a new channel description.
*This command requires channel op or higher.*
330 331 332 333 334 |
# File 'lib/libfchat/fchat.rb', line 330 def CDS(channel, description) json = {:channel => channel, :description => description} self.('CDS',json) end |
#CHA ⇒ Object
Request a list of all public channels
338 339 340 |
# File 'lib/libfchat/fchat.rb', line 338 def CHA() self.('CHA',{}) end |
#CIU(channel, character) ⇒ Object
Sends an invitation for a channel to a user
344 345 346 347 348 |
# File 'lib/libfchat/fchat.rb', line 344 def CIU(channel,character) json = {:channel => channel, :character => character } self.('CIU',json) end |
#CKU(channel, character) ⇒ Object
Kick a user from a channel
*This command requires channel op or higher*
354 355 356 357 358 |
# File 'lib/libfchat/fchat.rb', line 354 def CKU(channel,character) json = {:channel => channel, :character => character } self.('CKU',json) end |
#COA(channel, character) ⇒ Object
Op a user in a channel
*This command requires channel op or higher*
364 365 366 367 368 |
# File 'lib/libfchat/fchat.rb', line 364 def COA(channel,character) json = {:channel => channel, :character => character } self.('COA',json) end |
#COL(channel) ⇒ Object
Request a list of channel ops
372 373 374 375 |
# File 'lib/libfchat/fchat.rb', line 372 def COL(channel) json = {:channel => channel } self.('COL',json) end |
#CRC(channel) ⇒ Object
Creates a global channel
*This command is admin only*
381 382 383 384 |
# File 'lib/libfchat/fchat.rb', line 381 def CRC(channel) json = {:channel => channel } self.('CRC',json) end |
#CUB(channel, character) ⇒ Object
Unban a user from a channel
*This command requires channel op or higher*
390 391 392 393 394 |
# File 'lib/libfchat/fchat.rb', line 390 def CUB(channel,character) json = {:channel => channel, :character => character } self.('CUB',json) end |
#DOP(character) ⇒ Object
Request that a character be stripped of chatop status
*This command is admin only*
400 401 402 403 |
# File 'lib/libfchat/fchat.rb', line 400 def DOP(character) json = { :character => character } self.('DOP',json) end |
#FKS(kink, genders) ⇒ Object
Do a search for a kink with specific genders
407 408 409 410 411 |
# File 'lib/libfchat/fchat.rb', line 407 def FKS(kink,genders) json = { :kink => kink, :genders => genders } self.('FKS',json) end |
#got_ADL(message) ⇒ Object
Store list of ops
160 161 162 |
# File 'lib/libfchat/fchat.rb', line 160 def got_ADL() @ops = ['ops'] end |
#got_CDS(message) ⇒ Object
Store description for newly joined chatroom
254 255 256 |
# File 'lib/libfchat/fchat.rb', line 254 def got_CDS() @rooms[['channel']]['description'] = ['description'] end |
#got_COL(message) ⇒ Object
Store ops list for room
234 235 236 |
# File 'lib/libfchat/fchat.rb', line 234 def got_COL() @rooms[['channel']]['ops'] = ['oplist'] end |
#got_FLN(message) ⇒ Object
Handle user logging off
210 211 212 213 214 215 |
# File 'lib/libfchat/fchat.rb', line 210 def got_FLN() @users.delete(['character']) @rooms.each do |room| room['characters'].delete(['character']) end end |
#got_FRL(message) ⇒ Object
Store list of friends
166 167 168 |
# File 'lib/libfchat/fchat.rb', line 166 def got_FRL() @friends = ['characters'] end |
#got_ICH(message) ⇒ Object
Store userlist for newly joined chatroom
240 241 242 243 244 |
# File 'lib/libfchat/fchat.rb', line 240 def got_ICH() ['users'].each do |user| @rooms[['channel']]['characters'].push(user['identity']) end end |
#got_IDN(message) ⇒ Object
Know thyself
134 135 136 |
# File 'lib/libfchat/fchat.rb', line 134 def got_IDN() @me = ['character'] end |
#got_IGN(message) ⇒ Object
Store list of ignored users
172 173 174 |
# File 'lib/libfchat/fchat.rb', line 172 def got_IGN() @ops = ['characters'] end |
#got_JCH(message) ⇒ Object
Store data about newly joined chatroom
219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/libfchat/fchat.rb', line 219 def got_JCH() begin @rooms[['channel']]['characters'].push(['character']['identity']) rescue @rooms[['channel']] = { 'title' => ['title'], 'description' => '', 'characters' => [], 'ops' => [], } end end |
#got_LCH(message) ⇒ Object
Handle user leaving chatroom
248 249 250 |
# File 'lib/libfchat/fchat.rb', line 248 def got_LCH() @rooms[['channel']]['characters'].delete(['character']) end |
#got_LIS(message) ⇒ Object
Store list of online users
178 179 180 181 182 183 184 185 186 |
# File 'lib/libfchat/fchat.rb', line 178 def got_LIS() ['characters'].each do |character| @users[character[0]] = { 'gender' => character[1], 'status' => character[2], 'message' => character[3] } end end |
#got_NLN(message) ⇒ Object
Handle user logging on
190 191 192 193 194 195 196 |
# File 'lib/libfchat/fchat.rb', line 190 def got_NLN() @users[['identity']] = { 'gender' => ['gender'], 'status' => ['status'], 'message' => "" } end |
#got_PIN(message) ⇒ Object
Respond to keepalive ping messages
128 129 130 |
# File 'lib/libfchat/fchat.rb', line 128 def got_PIN() self.send('PIN') end |
#got_STA(message) ⇒ Object
Handle user changing status
200 201 202 203 204 205 206 |
# File 'lib/libfchat/fchat.rb', line 200 def got_STA() @users[['character']] = { 'gender' => @users[['character']]['gender'], 'status' => ['status'], 'message' => ['statusmsg'] } end |
#got_VAR(message) ⇒ Object
Store server-side variables
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/libfchat/fchat.rb', line 140 def got_VAR() if ['variable'] == 'chat_max' @chat_max = ['value'] elsif ['variable'] == 'priv_max' @priv_max = ['value'] elsif ['variable'] == 'lfrp_max' @lfrp_max = ['value'] elsif ['variable'] == 'lfrp_flood' @lfrp_flood = ['value'] elsif ['variable'] == 'msg_flood' @msg_flood = ['value'] elsif ['variable'] == 'permissions' @permissions = ['value'] else raise "ERROR: Do not know how to handle VAR #{}" end end |
#IDN(account, character, ticket, cname = @clientname, cversion = @version, method = "ticket") ⇒ Object
This command is used to identify with the server. NOTE: If you send any commands before identifying, you will be disconnected.
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/libfchat/fchat.rb', line 417 def IDN(account, character, ticket, cname=@clientname, cversion=@version, method="ticket") # Initial identification with the server json = {:account => account, :character => character, :ticket => ticket['ticket'], :cname => cname, :cversion => cversion, :method => 'ticket'} self.('IDN', json) end |
#IGN(action, character) ⇒ Object
Deal with ignoring characters.
Available ‘actions’
notify: send this when someone on the ignore list sends a message to you
add: Add a character to your ignore list
remove: Remove a character from your ignore list
440 441 442 443 444 |
# File 'lib/libfchat/fchat.rb', line 440 def IGN(action,character) json = { :action => action, :character => character } self.('IGN',json) end |
#IPB(character) ⇒ Object
Request that a character be IP banned
*This command is admin only*
450 451 452 453 |
# File 'lib/libfchat/fchat.rb', line 450 def IPB(character) json = { :character => character } self.('IPB',json) end |
#JCH(channel) ⇒ Object
Send a channel join request
457 458 459 460 |
# File 'lib/libfchat/fchat.rb', line 457 def JCH(channel) json = { :channel => channel } self.('JCH',json) end |
#KIK(character) ⇒ Object
Request a character to be kicked
*This command requires channel op or higher*
466 467 468 469 |
# File 'lib/libfchat/fchat.rb', line 466 def KIK(character) json = {:character => character } self.('KIK',json) end |
#KIN(character) ⇒ Object
Request a character’s list of kinks
473 474 475 476 |
# File 'lib/libfchat/fchat.rb', line 473 def KIN(character) json = {:character => character } self.('KIN',json) end |
#LCH(channel) ⇒ Object
Leave a channel
480 481 482 483 |
# File 'lib/libfchat/fchat.rb', line 480 def LCH(channel) json = {:channel => channel } self.('LCH',json) end |
#login(server, account, password, character, timeout = 30) ⇒ Object
Login to fchat as a specific user, and start the event machine
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/libfchat/fchat.rb', line 86 def login(server,account,password,character,timeout=30) webapi = Libfchat::WebAPI.new @ticket = webapi.get_ticket(account,password) @me = character EM.run { @websocket = Faye::WebSocket::Client.new(server) @websocket.onopen = lambda do |event| #When we connect, log in self.IDN(account, character, ticket) end @websocket.onclose = lambda do |event| @websocket = nil end @websocket. = lambda do |event| self.(event.data) end } end |
#MSG(channel, message) ⇒ Object
Send a message to a channel
487 488 489 490 491 |
# File 'lib/libfchat/fchat.rb', line 487 def MSG(channel,) json = {:channel => channel, :message => } self.('MSG',json) end |
#OPP ⇒ Object
List presence of ops in all rooms
495 496 497 |
# File 'lib/libfchat/fchat.rb', line 495 def OPP() self.('OPP',{}) end |
#ORS ⇒ Object
Request a list of open private rooms
501 502 503 |
# File 'lib/libfchat/fchat.rb', line 501 def ORS() self.('ORS',{}) end |
#parse_message(msg) ⇒ Object
Parse message received from server
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/libfchat/fchat.rb', line 67 def (msg) type = msg[0,3] begin data = MultiJson.load(msg[4..-1]) rescue data = MultiJson.load('{}') end @logger.debug("<< #{msg}") begin self.send("got_#{type}",data) rescue end end |
#PIN ⇒ Object
Respond to a ping request
507 508 509 |
# File 'lib/libfchat/fchat.rb', line 507 def PIN() self.('PIN',{}) end |
#PRI(recipient, message) ⇒ Object
Sends a prive message to another user
513 514 515 516 517 |
# File 'lib/libfchat/fchat.rb', line 513 def PRI(recipient,) json = {:recipient => recipient, :message => } self.('PRI',json) end |
#PRO(character) ⇒ Object
Do a profile request
521 522 523 524 |
# File 'lib/libfchat/fchat.rb', line 521 def PRO(character) json = {:character => character } self.('PRO',json) end |
#RAN(channel) ⇒ Object
Advertises the first open private channel owned by the client in the given channel
529 530 531 532 |
# File 'lib/libfchat/fchat.rb', line 529 def RAN(channel) json = {:channel => channel } self.('RAN',json) end |
#RLL(channel, dice) ⇒ Object
Roll dice in a channel
536 537 538 539 540 |
# File 'lib/libfchat/fchat.rb', line 536 def RLL(channel,dice) json = {:channel => channel, :dice => dice } self.('RLL',json) end |
#RST(channel, status) ⇒ Object
Set a private room’s status to closed or open
*This command requires channel op or higher*
546 547 548 549 550 |
# File 'lib/libfchat/fchat.rb', line 546 def RST(channel,status) json = {:channel => channel, :status => status } self.('RST',json) end |
#RWD(character) ⇒ Object
Reward a user, for instance, for finding a bug
*This command is admin only*
556 557 558 559 |
# File 'lib/libfchat/fchat.rb', line 556 def RWD(character) json = {:character => character } self.('RWD',json) end |
#send_message(type, json) ⇒ Object
Generic message sender
111 112 113 114 115 116 117 118 119 120 |
# File 'lib/libfchat/fchat.rb', line 111 def (type, json) jsonstr = ::MultiJson.dump(json) msg = "#{type} #{jsonstr}" if type == 'IDN' json[:ticket] = '[REDACTED]' end filteredjsonstr = ::MultiJson.dump(json) @logger.debug(">> #{type} #{filteredjsonstr}") @websocket.send(msg) end |
#STA(status, statusmsg) ⇒ Object
Request a new status to be set for your character
563 564 565 566 567 |
# File 'lib/libfchat/fchat.rb', line 563 def STA(status,statusmsg) json = {:status => status, :statusmsg => statusmsg } self.('STA',json) end |
#TMO(character, time, reason) ⇒ Object
Admin or chatop command to request a timeout for a user time must be a minimum of one minute, and maximum of 90 minutes
*This command requires channel op or higher*
574 575 576 577 578 579 |
# File 'lib/libfchat/fchat.rb', line 574 def TMO(character,time,reason) json = {:character => character, :time => time, :reason => reason } self.('TMO',json) end |
#TPN(character, status) ⇒ Object
User x is typing/stopped typing/entered text for private messages
Available values for status: clear, paused, typing
585 586 587 588 589 |
# File 'lib/libfchat/fchat.rb', line 585 def TPN(character,status) json = {:character => character, :status => status } self.('TPN',json) end |
#UBN(character) ⇒ Object
Unban a character
*This command requires chat op or higher*
595 596 597 598 |
# File 'lib/libfchat/fchat.rb', line 595 def UBN(character) json = {:character => character } self.('UBN',json) end |