Advertisement
Guest User

Untitled

a guest
Jul 10th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 8.15 KB | None | 0 0
  1.  
  2. require 'cinch'
  3. require 'ruby_cowsay'
  4. require 'open-uri'
  5. require 'nokogiri'
  6.  
  7. kekbot = CinchBot.new do
  8.     configure do c
  9.         c.server = irc.rizon.net
  10.     c.port = 6660
  11.     c.nick = kekbot
  12.     c.channels = [#homescreen]
  13.     end
  14.  
  15.     on message, ^.g (.+) do m, query
  16.         begin
  17.             search_l = query.split( )
  18.         search = search_l.join(+)
  19.         srch_pg = NokogiriHTML(open('httpwww.google.comsearchq='.concat(search)))
  20.         out = Result for #{query}n
  21.         link = srch_pg.css('h3 a')[0]['href']
  22.         7.times { link[0] =  }
  23.         link_splt = link.split(&sa)
  24.         out.concat(link_splt.first)
  25.         m.reply(out)
  26.     rescue
  27.         m.reply(No results found!)
  28.     end
  29.     end
  30.  
  31.     on message, ye do m
  32.         m.reply YEEZY YEEZY WHATS GOOD
  33.         m.reply ITS YA BOI MAX B
  34.     end
  35.    
  36.     on message, yeezy do m
  37.         m.reply YEEZY YEEZY WHATS GOOD
  38.     end
  39.  
  40.     on message, yeezus do m
  41.         m.reply JUST ROSE AGAIN
  42.     end
  43.  
  44.     on message, [4][2][0] do m
  45.         m.reply blaze it fegit
  46.     end
  47.  
  48.     on message, .pomf do m
  49.         m.reply O C==3
  50.         m.reply OC==3
  51.         m.reply C==3
  52.         m.reply C=3
  53.         m.reply C3
  54.         m.reply 3
  55.     end
  56.  
  57.     on message, [Nn][Aa][Vv][Yy] do m
  58.         m.reply What the fuck did you just fucking say about me, you little bitch
  59.     end
  60.  
  61.     on message, linux do m
  62.         if rand(5) == 1
  63.             m.reply I'd just like to interject for a moment.
  64.         m.reply What you’re referring to as Linux, is in fact, GNULinux, or as I’ve recently taken to calling it, GNU + Linux.
  65.     end
  66.    end
  67.  
  68.    on message, [Mm][Aa][Kk][Ii] do m
  69.     m.reply 5 Cute Facts About Maki
  70.     m.reply - She's a girl!
  71.     m.reply - She's a tomato!
  72.     m.reply - I love her!!!
  73.     m.reply - MAKI!!!!!!!!!
  74.    end
  75.  
  76.    on message, ayy do m
  77.        m.reply lmao
  78.    end
  79.  
  80.    on message, o shit do m
  81.        m.reply waddup
  82.    end
  83.  
  84.    on message, dude do m
  85.        m.reply weed lmao
  86.    end
  87.  
  88.    on message, lok do m
  89.        m.reply lol
  90.    end
  91.  
  92.    on message,  do m
  93.        m.reply  
  94.    end
  95.  
  96.    on message, meme do m
  97.        m.reply i love memes!
  98.    end
  99.    
  100.    on message, ^) do m
  101.        m.reply ^^^)
  102.    end
  103.  
  104.  
  105.    on message, ^.cowsay (.+) do m, say
  106.        m.reply Cow.new.say(say)
  107.    end
  108.  
  109.    on message, ^.eat (.+) do m, target
  110.        m.channel.action(eats .concat(target))
  111.    end
  112.  
  113.    on message, ^.rwb (.+) do m, words
  114.        out =
  115.     col = 0
  116.     w_arr = words.split( )
  117.     w_arr.each do word
  118.         if col == 0
  119.             out.concat(Format(red, word).concat( ))
  120.         end
  121.  
  122.         if col == 1
  123.             out.concat(Format(white, word).concat( ))
  124.         end
  125.  
  126.         if col == 2
  127.             out.concat(Format(blue, word).concat( ))
  128.         col = 0
  129.         else
  130.             col = col + 1
  131.         end
  132.        end
  133.     m.reply(out)
  134.    end
  135.  
  136.    on message, ^.rwg (.+) do m, words
  137.        out =
  138.     col = 0
  139.     w_arr = words.split( )
  140.     w_arr.each do word
  141.         if col == 0
  142.             out.concat(Format(red, word).concat( ))
  143.         end
  144.  
  145.         if col == 1
  146.             out.concat(Format(white, word).concat( ))
  147.         end
  148.  
  149.         if col == 2
  150.             out.concat(Format(green, word).concat( ))
  151.         col = 0
  152.         else
  153.             col = col + 1
  154.         end
  155.        end
  156.     m.reply(out)
  157.    end
  158.    
  159.    on message, ^.meme (.+) do m, meme
  160.        meme_list = meme.split()
  161.     meme_spaced = meme_list.join( )
  162.     m.reply(meme_spaced)
  163.     for i in 1..meme.length do
  164.            m.reply(meme[i])
  165.     end
  166.    end
  167.  
  168.    on message, ^.shill (.+) do m, amd
  169.        m.reply(amd.upcase.concat(!!!))
  170.        m.reply(amd.upcase.concat(!!!))
  171.        m.reply(amd.upcase.concat(!!!))
  172.    end
  173.  
  174.    on message, .part do m
  175.        m.channel.part()
  176.    end
  177. end
  178.  
  179. kekbot.start
  180.    
  181. 1
  182. 2
  183. 3
  184. 4
  185. 5
  186. 6
  187. 7
  188. 8
  189. 9
  190. 10
  191. 11
  192. 12
  193. 13
  194. 14
  195. 15
  196. 16
  197. 17
  198. 18
  199. 19
  200. 20
  201. 21
  202. 22
  203. 23
  204. 24
  205. 25
  206. 26
  207. 27
  208. 28
  209. 29
  210. 30
  211. 31
  212. 32
  213. 33
  214. 34
  215. 35
  216. 36
  217. 37
  218. 38
  219. 39
  220. 40
  221. 41
  222. 42
  223. 43
  224. 44
  225. 45
  226. 46
  227. 47
  228. 48
  229. 49
  230. 50
  231. 51
  232. 52
  233. 53
  234. 54
  235. 55
  236. 56
  237. 57
  238. 58
  239. 59
  240. 60
  241. 61
  242. 62
  243. 63
  244. 64
  245. 65
  246. 66
  247. 67
  248. 68
  249. 69
  250. 70
  251. 71
  252. 72
  253. 73
  254. 74
  255. 75
  256. 76
  257. 77
  258. 78
  259. 79
  260. 80
  261. 81
  262. 82
  263. 83
  264. 84
  265. 85
  266. 86
  267. 87
  268. 88
  269. 89
  270. 90
  271. 91
  272. 92
  273. 93
  274. 94
  275. 95
  276. 96
  277. 97
  278. 98
  279. 99
  280. 100
  281. 101
  282. 102
  283. 103
  284. 104
  285. 105
  286. 106
  287. 107
  288. 108
  289. 109
  290. 110
  291. 111
  292. 112
  293. 113
  294. 114
  295. 115
  296. 116
  297. 117
  298. 118
  299. 119
  300. 120
  301. 121
  302. 122
  303. 123
  304. 124
  305. 125
  306. 126
  307. 127
  308. 128
  309. 129
  310. 130
  311. 131
  312. 132
  313. 133
  314. 134
  315. 135
  316. 136
  317. 137
  318. 138
  319. 139
  320. 140
  321. 141
  322. 142
  323. 143
  324. 144
  325. 145
  326. 146
  327. 147
  328. 148
  329. 149
  330. 150
  331. 151
  332. 152
  333. 153
  334. 154
  335. 155
  336. 156
  337. 157
  338. 158
  339. 159
  340. 160
  341. 161
  342. 162
  343. 163
  344. 164
  345. 165
  346. 166
  347. 167
  348. 168
  349. 169
  350. 170
  351. 171
  352. 172
  353. 173
  354. 174
  355. 175
  356. 176
  357. 177
  358. 178
  359. 179
  360. 180
  361. require 'cinch'
  362. require 'ruby_cowsay'
  363. require 'open-uri'
  364. require 'nokogiri'
  365.  
  366. kekbot = CinchBot.new do
  367.    configure do c
  368.        c.server = zozzle.info
  369.     c.port = 16000
  370.     c.user = kekbot
  371.     c.password = iamabot
  372.     c.nick = kekbot
  373.     c.channels = [#homescreen, #ensorcell]
  374.    end
  375.  
  376.    on message, ^.g (.+) do m, query
  377.        begin
  378.            search_l = query.split( )
  379.         search = search_l.join(+)
  380.         srch_pg = NokogiriHTML(open('httpwww.google.comsearchq='.concat(search)))
  381.         out = Result for #{query}n
  382.         link = srch_pg.css('h3 a')[0]['href']
  383.         7.times { link[0] =  }
  384.         link_splt = link.split(&sa)
  385.         out.concat(link_splt.first)
  386.         m.reply(out)
  387.     rescue
  388.         m.reply(No results found!)
  389.     end
  390.    end
  391.  
  392.    on message, ye do m
  393.        m.reply YEEZY YEEZY WHATS GOOD
  394.        m.reply ITS YA BOI MAX B
  395.    end
  396.    
  397.    on message, yeezy do m
  398.        m.reply YEEZY YEEZY WHATS GOOD
  399.    end
  400.  
  401.    on message, yeezus do m
  402.        m.reply JUST ROSE AGAIN
  403.    end
  404.  
  405.    on message, [4][2][0] do m
  406.        m.reply blaze it fegit
  407.    end
  408.  
  409.    on message, .pomf do m
  410.        m.reply O C==3
  411.        m.reply OC==3
  412.        m.reply C==3
  413.        m.reply C=3
  414.        m.reply C3
  415.        m.reply 3
  416.    end
  417.  
  418.    on message, [Nn][Aa][Vv][Yy] do m
  419.        m.reply What the fuck did you just fucking say about me, you little bitch
  420.    end
  421.  
  422.    on message, linux do m
  423.        if rand(5) == 1
  424.            m.reply I'd just like to interject for a moment.
  425.         m.reply What you’re referring to as Linux, is in fact, GNULinux, or as I’ve recently taken to calling it, GNU + Linux.
  426.     end
  427.     end
  428.  
  429.     on message, [Mm][Aa][Kk][Ii] do m
  430.     m.reply 5 Cute Facts About Maki
  431.     m.reply - She's a girl!
  432.     m.reply - She's a tomato!
  433.     m.reply - I love her!!!
  434.     m.reply - MAKI!!!!!!!!!
  435.     end
  436.  
  437.     on message, ayy do m
  438.         m.reply lmao
  439.     end
  440.  
  441.     on message, o shit do m
  442.         m.reply waddup
  443.     end
  444.  
  445.     on message, dude do m
  446.         m.reply weed lmao
  447.     end
  448.  
  449.     on message, lok do m
  450.         m.reply lol
  451.     end
  452.  
  453.     on message,  do m
  454.         m.reply  
  455.     end
  456.  
  457.     on message, meme do m
  458.         m.reply i love memes!
  459.     end
  460.    
  461.     on message, ^) do m
  462.         m.reply ^^^)
  463.     end
  464.  
  465.  
  466.     on message, ^.cowsay (.+) do m, say
  467.         m.reply Cow.new.say(say)
  468.     end
  469.  
  470.     on message, ^.eat (.+) do m, target
  471.         m.channel.action(eats .concat(target))
  472.     end
  473.  
  474.     on message, ^.rwb (.+) do m, words
  475.         out =
  476.     col = 0
  477.     w_arr = words.split( )
  478.     w_arr.each do word
  479.         if col == 0
  480.             out.concat(Format(red, word).concat( ))
  481.         end
  482.  
  483.         if col == 1
  484.             out.concat(Format(white, word).concat( ))
  485.         end
  486.  
  487.         if col == 2
  488.             out.concat(Format(blue, word).concat( ))
  489.         col = 0
  490.         else
  491.             col = col + 1
  492.         end
  493.         end
  494.     m.reply(out)
  495.     end
  496.  
  497.     on message, ^.rwg (.+) do m, words
  498.         out =
  499.     col = 0
  500.     w_arr = words.split( )
  501.     w_arr.each do word
  502.         if col == 0
  503.             out.concat(Format(red, word).concat( ))
  504.         end
  505.  
  506.         if col == 1
  507.             out.concat(Format(white, word).concat( ))
  508.         end
  509.  
  510.         if col == 2
  511.             out.concat(Format(green, word).concat( ))
  512.         col = 0
  513.         else
  514.             col = col + 1
  515.         end
  516.         end
  517.     m.reply(out)
  518.     end
  519.    
  520.     on message, ^.meme (.+) do m, meme
  521.         meme_list = meme.split()
  522.     meme_spaced = meme_list.join( )
  523.     m.reply(meme_spaced)
  524.     for i in 1..meme.length do
  525.             m.reply(meme[i])
  526.     end
  527.     end
  528.  
  529.     on message, ^.shill (.+) do m, amd
  530.         m.reply(amd.upcase.concat(!!!))
  531.         m.reply(amd.upcase.concat(!!!))
  532.         m.reply(amd.upcase.concat(!!!))
  533.     end
  534.  
  535.     on message, .part do m
  536.         m.channel.part()
  537.     end
  538. end
  539.  
  540. kekbot.start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement