Index: procbot.rb ================================================================== --- procbot.rb +++ procbot.rb @@ -1,11 +1,11 @@ #!/usr/bin/ruby # encoding: UTF-8 require "cinch" Bots = ["cclg", "sext", "sect", "order", "monster", "pharma", "argue","crime","drug","badbio","bottist","egret_txt", "babdio", "botsoc","dx","ransul"] -ShoutingMatch = /\b(MS\.|MS\s|SERGEANT\s|SGT\s|SGT\.)?\s*(SAMANTHA TAGGART|SAMANTHA TAGUE|SAMANTHA|SAM TAGUE|SAM TAGGART|SAMTAGUE|SAMMY|SAM|TAGUE|TAGGART)\b/ -SmallMatch = /\b(ms\.|ms\s|sergeant\s|sgt\s|sgt\.)?\s*(samantha taggart|samantha tague|samantha|sam tague|sam taggart|samtague|sam|sammy|tague|taggart|(ね|)サム|(ね|)サムさん|(ね|)サムちゃん|سام|يا سام)\b/i +ShoutingMatch = /\b(MS\.|MS\s|SERGEANT\s|SGT\s|SGT\.|COMRADE\s|CITIZEN\s)?\s*(SAMANTHA TAGGART|SAMANTHA TAGUE|SAMANTHA|SAM TAGUE|SAM TAGGART|SAMTAGUE|SAMMY|SAM|TAGUE|TAGGART)\b/ +SmallMatch = /\b(ms\.|ms\s|sergeant\s|sgt\s|sgt\.|comrade\s|citizen\s)?\s*(samantha taggart|samantha tague|samantha|sam tague|sam taggart|samtague|sam|sammy|tague|taggart|(ね|)サム|(ね|)サムさん|(ね|)サムちゃん|سام|يا سام)\b/i FormalQs = [ "How may I be of assistance", "Yes", "You rang", "What can I do for you today", @@ -27,11 +27,11 @@ #c.sasl.username = "sam-tague" #c.sasl.password = "bott-ist-tot" c.ssl.use = true end - on :message, /\b(ms\.|ms\s|sergeant\s|sgt\s|sgt\.)?\s*(samantha taggart|samantha tague|samantha|sam tague|sam taggart|samtague|sam|tague|taggart|(ね|)サム|(ね|)サムさん|(ね|)サムちゃん|سام|يا سام)\b/i do |m| + on :message, /\b(ms\.|ms\s|sergeant\s|sgt\s|sgt\.|comrade\s|citizen\s)?\s*(samantha taggart|samantha tague|samantha|sam tague|sam taggart|samtague|sam|tague|taggart|(ね|)サム|(ね|)サムさん|(ね|)サムちゃん|سام|يا سام)\b/i do |m| @m=m @shouting = false def reply(x) if @shouting @@ -62,19 +62,23 @@ rank=ranks[user] else rank="Commander" end cmd.map! {|x| x.strip} - + cmd[1].downcase! if cmd[1] == "ms" or cmd[1] == "ms." formality = :formal name = cmd[2].downcase action = cmd[3].downcase elsif cmd[1] == "sergeant" or cmd[1]=="sgt" or cmd[1]=="sgt." formality = :military name = cmd[2].downcase + action = cmd[3] + elsif cmd[1] == "comrade" or cmd[1]=="citizen" + formality = :ranuir + name = cmd[2].downcase action = cmd[3] else formality = :friendly name = cmd[1].downcase action = cmd[2] @@ -85,11 +89,11 @@ greeting = "" else greeting = cmd[0].downcase end - greetings = ["hey", "hi", "yo", "hello","hey there","hi there","yo there","heya","what up","oh shit","aw yeah","ahlan","hujambo","اهلن", "你好","morning","evening","afternoon","good morning","good evening","good afternoon", "buenos días", "buenos dias", "buenos tardes", "bonjour", "ciao", "bonsoir", "howdy"] + greetings = ["hey", "hi", "yo", "hello","hey there","hi there","yo there","heya","what up","oh shit","aw yeah","ahlan","hujambo","اهلن", "你好","morning","evening","afternoon","good morning","good evening","good afternoon", "buenos días", "buenos dias", "buenos tardes", "bonjour", "ciao", "bonsoir", "howdy", "lif a til", "sil a iur", "s'aiur", "sosh a tur"] if greetings.include?(action.sub(/^\W*/,'').sub(/\W*$/,'')) greeting = action action = "" end action.sub!(/^\W*/,'') @@ -125,11 +129,35 @@ "Report!" ] : [ "Sir!", "What's the situation, sir?", "What's the situation, "+rank+"?", + ], + :ranuir => [ + 'hal masenan?', + 'hal mase?', + 'halte?', + 'masin halte?', + 'masenan?', + 'han?', + 'hal?', + 'hal', + 'an dale', + 'hala pere?', + 'hala perenan?', + 'perenan?', + 'hali iufit an sana rigaste?', + 'rigastenan?', + 'an sana rigastenan?', + 'an sana rigaftenan?', + 'hal sana geshenan?', + 'gesh dalenan?', + 'halit gesh dale?', + 'sil a iur', + 's\'aiur' ] + } affirmatives = { :friendly => [ "sure thing.", "no problem.", @@ -156,10 +184,19 @@ "Roger that, sir!", "Roger!", "Wilco, sir!", "Wilco, "+rank+"!", "Roger, " +rank+"!", + ], + :ranuir => [ + "elen vinesh.", + "hante.", + "han.", + "hante, surin.", + "han, surin.", + "coshvin.", + "coshvin, san." ] } def scancmd(x,strs) strs.each { |str| return "" if x==str @@ -310,10 +347,23 @@ "Cannot comply, sir.", "Not possible, "+rank+".", "Negative, sir, we're pinned down!", "We don't have the troops for that, "+rank+"!", "Sorry, sir, there's nothing I can do." + ], + :ranuir => [ + "lahi narit elena risesh e masi rih elena talo ve", + "elen riho ve", + "riho ve", + "ve", + "masa vesh", + "masasto ve", + "elen vinasto ve", + "vini rih elena talo ve", + "vina riho ve", + "masa vinasto ve", + "elen masa vinasto ve" ] } whoareyou = { :friendly => [ "i'm sam!", @@ -334,10 +384,22 @@ "Sergeant First Class Sam Taggart, sir!", "Sergeant Taggart, sir.", "Sergeant Taggart, sir. The boys call me Tague.", "Sergeant Taggart, sir. But you can call me Sam.", "Sergeant Taggart, sir. Call me Sam." + ], :ranuir => [ + 'an Sama varlaste', + 'an Sam aste', + 'an Sam sa sule', + 'ani sul Sam aste', + 'an Sama sule', + 'Samtag-varlas ante', + 'Sam ante', + 'Sam-varlas ante', + 'an Sama sule na varlasa lase', + 'an Sama sule na varlaste', + 'ran ana Samma afsule' ] } goodgirl = { :friendly => [ "^_^", ":)", @@ -366,10 +428,20 @@ "Roger that, sir!", "Thank you, sir!", "You're not so bad yourself, sir.", "Thank you, sir. And may I just say - it's been a pleasure serving under you, sir.", "Godspeed, sir!" + ], :ranuir => [ + 'tamit elen tare', + 'tilit elen tare', + 'sanit elen tare', + 'san shena me', + 'sanit elen tare, san shena me', + 'vin pelte', + 'vin pelte, san', + 'sana vines ien pelte', + 'sana vines ien elena afpele' ] } dontcare = { :friendly => [ "well you should care", @@ -398,10 +470,27 @@ "With all due respect, sir, caring is cool, sir!", rank+", sir, I urgently request that you consider your position, sir!", "Sir, with all due respect, I believe you are mistaken as to the importance of the situation, sir.", "Sir, this situation is rapidly spiraling out of control.", "But "+rank+", this situation is rapidly spiraling out of control." + ], :ranuir => [ + 'e mase', + 'vido she', + 'e, vido she', + 'vido ves ien uasa me', + 'reshes ien tefa me', + 'resho ves ienit des uasa me', + 'resho ves ienit des uastashte', + 'uaste', + 'masin uasa me', + 'tefo ve', + 'masin tefo ve', + 'masi ienit des tefo ve', + 'masi ienit des uasa me', + 'masi ienit des uastashte', + 'des rishis ien tefa me', + 'des risho ves ien uasa me', ] } thankyou = { :friendly => (mult ["np","no worries","sure thing","sure","ofc","of course","glad to help","don't worry about it","just glad to help","no problem","you got it"], ["", "!", "."]), :formal => [ @@ -420,11 +509,22 @@ ], :military => [ "No thanks necessary, sir!", "Just doing my job, sir.", "It's what they pay me for, sir.", "Sir, yes, sir!" + ], :ranuir => [ + "tamit elen tare", + "tamit val tare", + "sanit elen tare", + "ashit val tare", + "rig pelte", + "asha riges ien pelte", + "asha riges ien vala afpele", + "sav citte", + "sav valari citte" ] + } insults = { :friendly => [ "i don't like you either, pal", "fuck you", "fuck you too", @@ -470,11 +570,63 @@ "Out of line!", "You're out of line!", "You're out of line, soldier!", "Out of line, "+lowranks.sample+" "+user+"!", "You're out of line, "+lowranks.sample+" "+user+"!" + ], :ranuir => [ + 'uaste!', + 'des uastashte!', + 'des uasa me!', + 'tef desa veshe!', + 'eteffe des!', + 'tefo ve des!', + 'des surinto ve!', + 'eteffime des!', + 'des uasa mo se!', + 'des uastashto se!', + 'uasto ie!', + 'des uastashto ie!', + 'uastash!', + 'des she!', + 'des ie!', + 'uas ie!', + 'desi uas ie!', + 'uas desi evtegor rana!', + 'uas desi evtefime rana!', + 'des rantashto ve!', + 'des rantashto vo se!', + 'des rantashto vo ie!', + 'tef desa vesho ie!', + 'veshe tef e dale uas!', + 'tef vesho a uas dalo ie!', + 'vittashte des!', + 'vittashie des!', + 'cit a tef a shen veshe desit!', + 'uasa desdi fesash!', + 'des aftaranash!', + 'dim desat!', + 'desi dim randasit!', + 'desa avuenash!', + 'tef desa talo ve!', + 'tar desa talo ve!', + 'desit tar veshe!', + 'desi tar dalo ve!', + 'lahi narit desa risash!', + 'ris desat!', + 'mac desat!', + 'desa afmacanash!', + 'desa afsigrisanash!', + 'tahinar gatfori angatash tef veshes lata desi!', + 'suf risi desat!', + 'tahinte des!', + 'tahinie des!', + 'tahin tahinari!', + 'tahuen rana evtefime!', + 'des me tahuena!', + 'taha me des!' ] + } if param=scancmd(action,["meet","this is","these are", "let me introduce you to","let me introduce", "allow me to introduce you to", "allow me to introduce", @@ -494,11 +646,11 @@ ].sample+", "+param+(rand(2)==0 ? ". "+user+" has told me so much about you" : "") elsif param=scancmd(action,["good night","night","gnight","g'night","i'm going to bed","going to bed","im going to bed", "bedtime", "time for bed", "it's my bedtime","its my bedtime","nighty-night"]) reply mult(["good night","night","sleep well","sleep tight","i wish you an enjoyable cycle of nocturnal hallucinations", "commencement of dormancy phase acknowledged"], ["", ", "+user, ", pesky flesh-creature", ", human", ", mortal"]).sample elsif param=scancmd(action,["i don't care","it doesn't matter","don't care","idc","nevermind","never mind","nvm","i don't give a shit","i don't give a fuck", "does it look like i care"]) reply dontcare[formality].sample - elsif param=scancmd(action,["fuck you","fuck off","go fuck yourself","get fucked","fu","get bent","diaf","die in a fire","screw you","you cunt","you bitch","you piece of shit","you scumbag","you sleazeball","you jackass","you asshole","you cockroach"]) + elsif param=scancmd(action,["fuck you","fuck off","go fuck yourself","get fucked","fu","get bent","diaf","die in a fire","screw you","you cunt","you bitch","you piece of shit","you scumbag","you sleazeball","you jackass","you asshole","you cockroach","des"]) reply insults[formality].sample elsif param=scancmd(action,["thanks","thank you","i appreciate it", "ty", "thx", "obliged", "much obliged","appreciated","danke","gracias","merci","merci beaucoup","shukran","shukran jazeelan","asante","asante sana","arigatou","doumo arigatou", "ありがとう", "どうもありがとう", "どうもありがとうございます","شكران", "شكران جزيلاا"]) reply thankyou[formality].sample elsif param=scancmd(action,["well done","good work","excellent work","good girl","nicely done","nice job","good job","perfect","you did well","excellent job","you did great","you did perfect","you did perfectly","wonderful","you did good","gj"]) reply goodgirl[formality].sample @@ -526,10 +678,14 @@ if action=="" if formality == :friendly reply (nulls[:friendly] + [ greeting+" yourself" ]).sample + elsif formality == :ranuir + reply (nulls[:ranuir] + [ + "a " + greeting + ['sanat','tilat','tamat'].sample + ]).sample elsif formality == :formal r = greeting r[0]=r[0].upcase reply r +", " + user + "." elsif formality == :military