daskherb-libera.hs 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. --important, reminder, Digit ! This is stage4 type, not stage 3 type.
  2. -- therefor, mind your pastes from type 3 to type 4 need the " h" taken out of equations
  3. --also
  4. -- check daskherbserchtest.hs to see how far you got towards implementing faux search.
  5. import Data.List
  6. import Network
  7. import System.IO
  8. import System.Exit
  9. import Control.Arrow
  10. import Control.Monad.Reader
  11. import Control.Exception
  12. import Text.Printf
  13. import System.Random -- import random, it said, surely they meant import Random, trying System.Random
  14. --server = "irc.freenode.org"
  15. server = "irc.libera.chat"
  16. port = 6667
  17. --chan = "##bedrock-ganja"
  18. --chan = "##bedrock-treehouse"
  19. --chan = "##gentoo-herb"
  20. chan = "#gentoo-weed"
  21. --chan = "##tokingaspies"
  22. --chan = "#gentoo-weed ##bedrock-treehouse ##tokingaspies" -- this launched, but still only in #gentoo-weed
  23. --chan = "#gentoo-weed, ##bedrock-treehouse, ##tokingaspies" -- -- lol! it just returns ##bedrock-treehouse for all commands.
  24. --chan = "#gentoo-weed" "##bedrock-treehouse" "##tokingaspies" -- nice try, but no, not how to join more than 1 chan
  25. --chana = "##bedrock-treehouse" -- nice try, but no, not how to join more than 1 chan
  26. --chanb = "##toking-aspies" -- nice try, but no, not how to join more than 1 chan
  27. --chan = "##tokingaspies"
  28. --chan = "#akashicwhatever"
  29. --chan = "##bedrock-chat"
  30. --chan = "#muhcows"
  31. --chan = "#cultivators"
  32. nick = "daskherb"
  33. -- The 'Net' monad, a wrapper over IO, carrying the bot's immutable state.
  34. type Net = ReaderT Bot IO
  35. data Bot = Bot { socket :: Handle }
  36. -- Set up actions to run on start and end, and run the main loop
  37. main :: IO ()
  38. main = bracket connect disconnect loop
  39. where
  40. disconnect = hClose . socket
  41. loop st = runReaderT run st
  42. -- Connect to the server and return the initial bot state
  43. connect :: IO Bot
  44. connect = notify $ do
  45. h <- connectTo server (PortNumber (fromIntegral port))
  46. hSetBuffering h NoBuffering
  47. return (Bot h)
  48. where
  49. notify a = bracket_
  50. (printf "Connecting to %s ... " server >> hFlush stdout)
  51. (putStrLn "done.")
  52. a
  53. -- We're in the Net monad now, so we've connected successfully
  54. -- Join a channel, and start processing commands
  55. run :: Net ()
  56. run = do
  57. write "NICK" nick
  58. write "USER" (nick++" 0 * :DigitsStonerBot")
  59. write "JOIN" chan
  60. -- write h "JOIN" Chana -- nice try, but no, not how to join more than 1 chan
  61. -- write h "JOIN" Chanb -- nice try, but no, not how to join more than 1 chan
  62. asks socket >>= listen
  63. -- Process each line from the server
  64. listen :: Handle -> Net ()
  65. listen h = forever $ do
  66. s <- init `fmap` io (hGetLine h)
  67. io (putStrLn s)
  68. if ping s then pong s else eval (clean s)
  69. where
  70. forever a = a >> forever a
  71. clean = drop 1 . dropWhile (/= ':') . drop 1
  72. ping x = "PING :" `isPrefixOf` x
  73. pong x = write "PONG" (':' : drop 6 x)
  74. --let ecumenical = ["yes","that would be an ecumenical matter."]
  75. --let ecumenical = [("yes"),("that would be an ecumenical matter.")]
  76. --ecumenical = [("yes"),("that would be an ecumenical matter.")]
  77. -- oh oh array! lets try that!
  78. --ecumenical = array (1, 3) [(1, "yes"),(2, "that would be an ecumenical matter."),(3, "drink!")]
  79. -- Dispatch a command
  80. eval :: String -> Net ()
  81. eval "!quit" = write "QUIT" ":Exiting" >> io (exitWith ExitSuccess)
  82. eval x | "!id " `isPrefixOf` x = privmsg (drop 4 x)
  83. eval "tryme" = privmsg "this will never work"
  84. --eval h x | Just x <- stripPrefix "!id " x = privmsg h x
  85. --eval h (stripPrefix "!id " -> Just x) = privmsg h x
  86. --eval x | "!id " `isPrefixOf` x = privmsg (drop 4 x)
  87. -- -- !search, based on !id/!say^... oops, made this then realised i already made !seek and !search
  88. eval x | "!research " `isPrefixOf` x = privmsg ("https://lmddgtfy.net/?q=" ++ (drop 10 x))
  89. eval x | "!seek " `isPrefixOf` x = privmsg ("well you would want to search for " ++ (drop 6 x) ++ " wouldnt you.") -- JOY (this is the winner, we can delete the rest... once you dont want them around any longer to see how you incrementally got there today.
  90. eval x | "bakunin" `isInfixOf` x = privmsg "Freedom without socialism is privilege and injustice. Socialism without freedom is slavery and brutality. -- Bakunin"
  91. --single
  92. --"https://duckduckgo.com/?q=words" "https://lmddgtfy.net/?q=words"
  93. --[2018-07-15 20:28:21] <el3> string.replace(" ", "%20")
  94. -- izgud
  95. --eval x | "!search " `isPrefixOf` x = privmsg ("https://lmddgtfy.net/?q=" ++ (drop 8 x) ++ " ? :)")
  96. --multiple
  97. -- eval x | "!search " `isPrefixOf` x = privmsg ("https://lmddgtfy.net/?q=" ++ (drop 8 x) ++ " though i caution you, these are not the droids you're looking for")
  98. --https://lmsptfy.com/?q=overton%20window
  99. -- izgud (i think... testing...)
  100. eval x | "!search " `isPrefixOf` x = privmsg ("https://lmsptfy.com/?q=" ++ (drop 8 x) ++ " ? :)")
  101. -- -- dev-wishlist, ability to say nick of ye who called forth a command. ... not just x for whatever else was said. ... did i ever find that yet?
  102. --eval x | "!dab " `isPrefixOf` x = privmsg ("FWOOM goes the ganja's gold, " ++ (drop 4 x) ++ "! ganja dabba doo!")
  103. --eval "!dab" = privmsg ("FWOOM goes the ganja's gold! ganja dabba doo!")
  104. --eval x | "!dab straw" `isPrefixOf` x = privmsg ("FWOOM goes the ganja's gold, " ++ (drop 9 x) ++ "! ganja dabba doo!")
  105. --eval "!dab straw" = privmsg ("FWOOM goes the ganja's gold! ganja dabba doo!")
  106. -- !blaze !fwoom
  107. eval x | "!blaze " `isPrefixOf` x = privmsg ("FWOOM go the ganja trees, " ++ (drop 6 x) ++ "! setting the world alite, the good way.")
  108. -- !fwoom !blaze
  109. eval x | "!fwoom " `isPrefixOf` x = privmsg ("Blazing ganja trees, " ++ (drop 7 x) ++ "! set the world alite, the good way.")
  110. -- !stone
  111. eval x | "!stone " `isPrefixOf` x = privmsg ("ganja stones " ++ (drop 7 x) ++ " to... well, stoned!")
  112. -- add wim hof stuff. !hof n such
  113. --
  114. eval x | "!pass " `isPrefixOf` x = privmsg ("Puff Puff Pass, " ++ (drop 6 x) ++ "! You're fucking up the rotation.") -- test remake of weedykins' !toke
  115. --eval x | "?!" `isSuffixOf` x = privmsg ("I dont know (or maybe I do), and cant (or wont) tell you.")
  116. --eval "!toke daskherb" = privmsg "dont pass to me. i dont have the lungs for it." -- got that elsewhere...
  117. --
  118. -- this is to replace weedykins' !toke, when weedykins is absent
  119. --eval x | "!toke " `isPrefixOf` x = privmsg ("Puff Puff Pass to " ++ (drop 6 x) ++ "! ^__^ ") -- test remake of weedykins' !toke
  120. eval "!toke" = privmsg "toke the pain away!"
  121. --eval x | "?!" `isSuffixOf` x = privmsg ("I dont know (or maybe I do), and cant (or wont) tell you.")
  122. -----------------------------
  123. -----------------------------
  124. ----- fatherjackbot dev -----
  125. --teehee. trained jack feature development happening here.
  126. -- level ONEs
  127. -- now get these two under the same "?"
  128. --eval x | "?" `isSuffixOf` x = privmsg ("yes")
  129. --eval x | "!?" `isSuffixOf` x = privmsg ("that would be an ecumenical matter.")
  130. -- level TWOs (as developed in daskjack.hs (and then fatherjackbot.hs))
  131. ---------- works
  132. --eval x | "?" `isSuffixOf` x = privmsg (if x == "?" then "that would be an ecumenical matter" else "yes") -- works :) use me! use me!
  133. -- the less spammy silenced(tedprefixed) version of level two working. *
  134. -- *
  135. --
  136. --[2018-08- 1 02:02:00] <+Digit> i thought i covered that with my volunteered info, why am i being interogated?
  137. --[2018-08- 1 02:02:01] <daskherb> yes
  138. --[2018-08- 1 02:02:35] <+Digit> oh, daskherb i thought i told you to stop answering any question with a yes?
  139. --[2018-08- 1 02:49:47] <+Digit> oh, i see, the isSufficOf is in effect, but the if x == "ted?" on the right of the equation still elsing so any~ yeah, just gonna comment that out until i get it right. ... ideally with a live toggle to stfu/jack-mode.
  140. -- eval x | "ted?" `isSuffixOf` x = privmsg (if x == "ted?" then "that would be an ecumenical matter" else "yes")
  141. --- ^ so that version needs work still... a toggle features feature is highly desireable. ... levels of stfu, interesting idea. per command stfu'ness, interesting too. combination... nice.
  142. -- nice vapor
  143. -- trying something (lets call it revisiting level 2, for 2.1)
  144. --eval x | "test?" `isSuffixOf` x = privmsg (if x == "thetest?" then "that would be an ecumenical matter" else "yes")
  145. -- eval x | "test?" `isSuffixOf` x = privmsg (if "daskherb:" `isPrefixOf` x then "that would be an ecumenical matter" else "yes") --works, as far as this goes.
  146. -- -- ^ that, if works (ha!) is only one increment away from fully functioning trained jack, would put the ecumenical/yes in the "then" and leave the "else" blank, so it doesnt reply to questions (or even "*test?" questions) if it's not the one being asked.
  147. -- repeating the working test, just as ? instead of test?
  148. --disabling for 2020 uhohmegaderp cleanup
  149. --eval x | "daskherb:" `isPrefixOf` x = privmsg (if "?" `isSuffixOf` x then "sure" else "so you say") --works, as far as this goes. but gonna change the suffix"?" to infix"?"
  150. eval x | "daskherb:" `isPrefixOf` x = privmsg (if "?" `isInfixOf` x then "sure" else ":)") --works, as far as this goes.
  151. -- trying level 2.2, where: then "that would be an ecumenical matter"|"yes" else ""
  152. -- if $name, if end="?" then either ecumenical or yes, else nada.
  153. --eval x | "retest?" `isSuffixOf` x = privmsg (if "daskherb:" `isPrefixOf` x then "that would be an ecumenical matter"|"yes" else "")
  154. --"" else "that would be an ecumenical matter"|"yes")
  155. -- level THREEs (development towards true random continues through other criteria).
  156. --eval x | "?" `isSuffixOf` x = privmsg (runRandom (("yes"),("that would be an ecumenical matter.")))-- no way will i get this right first time.
  157. --eval x | "?" `isSuffixOf` x = privmsg (runRandom (randR(("yes"),("that would be an ecumenical matter."))))-- no way will i get this right 2nd time.
  158. --eval x | "?" `isSuffixOf` x = privmsg (randR ("yes","that would be an ecumenical matter."))
  159. --ok, this one's using the list defined above. ecumenical. teehee.
  160. --eval x | "ted?" `isSuffixOf` x = privmsg (random.choice(ecumenical))
  161. --eval x | "ted?" `isSuffixOf` x = privmsg (randR(ecumenical))
  162. ---- ^ i will get there. i'm close.
  163. --eval x | "ted?" `isSuffixOf` x = privmsg (randR(ecumenical) x)
  164. --eval x | "ted?" `isSuffixOf` x = privmsg (random.choice(ecumenical) x)
  165. --eval x | "ted?" `isSuffixOf` x = privmsg (random.choice(ecumenical))
  166. --eval x | "ted?" `isSuffixOf` x = privmsg (randR(ecumenical))
  167. --eval x | "ted?" `isSuffixOf` x = privmsg (listo(rando)) -- halfway towards working it out then the insight slipped outta mind.
  168. --eval x | "ted?" `isSuffixOf` x = privmsg (randomRs ('e', 'y'))--
  169. --eval x | "ted?" `isSuffixOf` x = privmsg (randomRs ('e', 'y'))--
  170. --eval "!gimmieanumber" = privmsg (randR ("1","2")
  171. -- oh oh do it in an array! ... make the list above an array!
  172. --eval x | "ted?" `isSuffixOf` x = privmsg $ ecumenical
  173. -- -- level 4, like level 0(?) use isInfixOf, yus.
  174. --disabling for 2020 uhohmegaderp cleanup
  175. eval x | "retest?" `isInfixOf` x = privmsg (if "daskherb:" `isPrefixOf` x then "that would be an ecumenical matter" else "yes") --works, as far as this goes.
  176. -- eventually i'll get that such that it's a full working fatherjackbot....
  177. ---- fatherjackbot:
  178. --eval x | "?" `isInfixOf` x = privmsg (if "daskherb:" `isPrefixOf` x then "that would be an ecumenical matter" else "yes") --works, as far as this goes.
  179. -----commented out the full fatherjackbot line, since it would be annoying in a chan, answering every question with yes, unless asked directly then saying it would be an ecumenical matter. the isInfixOf "?" could likely just as well be isSuffixOf. that might reduce verbosity.
  180. -----
  181. --teehee
  182. --eval x | "420" `isInfixOf` x = privmsg ("!toke Weedykins")
  183. --eval x | "4:20" `isInfixOf` x = privmsg ("!toke all the lonely people") -- now try pass to the chatter who issued the command.
  184. --eval x | "!kyle" `isInfixOf` x = privmsg ("Listen, and understand. That terminator is out there. It can't be bargained with. It can't be reasoned with. It doesn't feel pity, or remorse, or fear. It absolutely won't stop until you're dead.")
  185. eval x | " flo " `isInfixOf` x = privmsg ("!toke all who want to get motivated by toking some Flo")
  186. eval x | "that's racist" `isInfixOf` x = privmsg ("https://www.youtube.com/watch?v=jPnP9IUMDLc")
  187. --
  188. eval x | "!themanfromearth" `isPrefixOf` x = privmsg ("http://ks392457.kimsufi.com/stuff/themanfromearth.mp4")
  189. --
  190. -- these are some basic sample commands for u to try out to make your own ones.
  191. eval "hello" = privmsg "is there anybody in there?"
  192. eval "evening gents" = privmsg "is that you drakken?"
  193. eval "!notimeforcaution" = privmsg "what are you doing? docking. it's not possible. no, it's necessary. https://www.youtube.com/watch?v=a3lcGnMhvsA this is no time for caution. if i black out, you take the stick. endurance is entering atmosphere. she's got no heatsheild."
  194. eval "this is no time for caution" = privmsg "https://www.youtube.com/watch?v=TV1767i8X4Q"
  195. -- Jack Herer
  196. eval x | "!jack" `isPrefixOf` x = privmsg "you dont know jack? https://jackherer.com/emperor-3/ https://www.youtube.com/watch?v=TaaupH6ZgUU :)"
  197. eval "!jackherer" = privmsg "https://jackherer.com/emperor-3/ https://www.youtube.com/watch?v=TaaupH6ZgUU"
  198. eval "!jack" = privmsg "https://jackherer.com/emperor-3/ https://www.youtube.com/watch?v=TaaupH6ZgUU"
  199. eval "!testcommand" = privmsg "this is the test responce."
  200. eval "!testcommand2" = privmsg "this is the test \t responce."
  201. eval "!testcommand3" = privmsg "this is the test \0 responce."
  202. eval x | "!russo" `isPrefixOf` x = privmsg "here's some: https://youtu.be/ht3getj1U0o"
  203. -- eval x | "meep" `isInfixOf` x = privmsg "I detect a meep!"
  204. eval "irie" = privmsg "bun bun babylon"
  205. -- -- DONT DO THESE, THEY ARE BAD, N KILL OTHER BOTS/CLIENTS!
  206. --eval x | "!arrowtest" `isPrefixOf` x = privmsg " ↑↓←→"
  207. --eval x | "!moontest" `isPrefixOf` x = privmsg " " -- wont even compile
  208. --eval x | "!mzfuzzybritchestest" `isPrefixOf` x = privmsg "෴෴෴෴෴"
  209. eval x | "slow this bird down" `isInfixOf` x = privmsg " https://www.youtube.com/watch?v=wgbyID-Plqo "
  210. --eval x | "!slowthisbirddown " `isPrefixOf` x = privmsg ("slow this " ++ (drop 18 x) ++ " down. https://www.youtube.com/watch?v=wgbyID-Plqo") -- -- test. ~ and i lost salve, wat! (update, no u didnt. salve was never in daskherb. that's weedykins who issues salve.)
  211. eval x | "!slowthisbirddown " `isPrefixOf` x = privmsg ("slow this " ++ (drop 18 x) ++ " down. https://www.youtube.com/watch?v=UsOZ1NKInsE") -- -- test. ~ and i lost salve, wat! (update, no u didnt. salve was never in daskherb. that's weedykins who issues salve.)
  212. eval x | "ultrahighdosepsilocybin2all" `isPrefixOf` x = privmsg " _ "
  213. eval "!adereth" = privmsg "https://www.youtube.com/watch?v=uk3A41U0iO4 matt adereth's clojure.core/typing talk "
  214. eval x | " dhmo" `isInfixOf` x = privmsg "dont fall for it. it's using your chemistry ignorance and unconventional naming to obfuscate that it's just water! it's just water! dhmo = dihydrogenmonoxide = 2 hydrogen 1 oxygen = water. dont ban it! next they'll tell you cannabis/hemp is a demon called marijuana. dont fall for lies trying to deprive you/us/all of essentials!"
  215. eval x | "crazy bitch" `isInfixOf` x = privmsg "did someone say crazy bitch? you mean her: https://www.youtube.com/embed/IgArgFsdkZk right?"
  216. eval x | "human nature" `isInfixOf` x = privmsg "did someone say human nature? you mean like: https://www.youtube.com/watch?v=EQnUFxoFqNY yes?"
  217. eval x | "!booze" `isPrefixOf` x = privmsg "you must be a robot from the future futurama told us about. do drink up."
  218. --eval "!bong" = privmsg "gurgle gurgle gurgle"
  219. eval x | "!longbong" `isPrefixOf` x = privmsg "click, click-fwoomf, gurgle gurgle gurgle gurgle gurgle gurgle-gurgle-gurgle . . . ahhhhhhhhhhh. :)"
  220. eval x | "!kylebong" `isPrefixOf` x = privmsg "Listen! And Understand. That Terminator is out there. It cant be bargained with. It cant be reasoned with. It does not feel pity, or remorse, or fear. And it absolutely will not stop, EVER, until you are click-click-fwoom glrglglrglglrglrlgrlglrglrhoooh dead"
  221. eval x | "!ragebong" `isPrefixOf` x = privmsg "rage against the pain!"
  222. eval x | "!mendbong" `isPrefixOf` x = privmsg "mendwards! gurgleglurgleblurglegurgle!"
  223. eval x | "!mendwardsbong" `isPrefixOf` x = privmsg "mendwards! gurgleglurgleblurglegurgle!"
  224. eval x | "!kiefbong" `isPrefixOf` x = privmsg "light er up and getter done doggy. I am fucking high."
  225. eval x | "!christmasbong" `isPrefixOf` x = privmsg "tis the season for kaneh bosm! get annointed, become christ'ened. girglgluglgriglbliglblurgleglugglug."
  226. eval x | "!choonsbong" `isPrefixOf` x = privmsg "TUNE! knees up, hands up, fly! boppin along. gurgle plurgle blurgle gurgle."
  227. eval x | "!drop" `isPrefixOf` x = privmsg "drop some terpenes + etc and be fine :)"
  228. --eval x | "!bong" `isPrefixOf` x = privmsg "gurgle gurgle gurgle"
  229. eval x | "!bong" `isPrefixOf` x = privmsg "blurgle gurgle blurble"
  230. --eval "!bongsmile" = privmsg ":פ" -- just to test that character that looked like a gargling smile
  231. --eval x | "!vape" `isPrefixOf` x = privmsg "We can vape if we want to, We can leaf your friends' good minds, 'Cause your friends don't vape And if they don't vape, We'll get your friends so high!"
  232. eval x | "!vape" `isPrefixOf` x = privmsg "We can vape if we want to, We can leaf your friends' good minds, 'Cause your friends want vape And if they want vape, We'll get your friends so high!"
  233. eval x | "!edible" `isPrefixOf` x = privmsg "om nom nom. wait wait wait. .... spaaaaaaaace."
  234. -- eval "!megavape" `isPrefixOf` x = privmsg "zomfg"
  235. eval x | "!megavape" `isPrefixOf` x = privmsg "zomg"
  236. --eval "!1hitta" `isPrefixOf` x = privmsg "efficient"
  237. eval x | "!1hitter" `isPrefixOf` x = privmsg "efficient"
  238. --eval "!1hitter" `isPrefixOf` x = privmsg "efficient"
  239. eval "!blunt" = privmsg "light er up take a puff"
  240. eval x | "!blunt" `isPrefixOf` x = privmsg "Suck down that fat blunt"
  241. eval "!spliff" = privmsg "now it's come to that time of the night, for spliff politics, when everybody knows who's got a spliff, and which direction it's going."
  242. eval x | "!spliff" `isPrefixOf` x = privmsg "have a toke on this tasty spliff."
  243. eval "!spliffpolitics" = privmsg "now it's come to that time of the night, for spliff politics, when everybody knows who's got a spliff, and which direction it's going. https://youtu.be/bfSXjwmvA7s "
  244. eval x | "!spliff" `isPrefixOf` x = privmsg "now it's come to that time of the night, for spliff politics, when everybody knows who's got a spliff, and which direction it's going. https://youtu.be/bfSXjwmvA7s "
  245. eval x | "!spacebong" `isPrefixOf` x = privmsg "roads? where we are going, we do not need ... roads. gurgle gurgle gurgle"
  246. -- making bongs able to have more said after them.
  247. eval x | "!churchbong" `isPrefixOf` x = privmsg (if "420" `isSuffixOf` x then "happy 420. ~ gurgle gurgle gurgle" else "ommmmmmmm. we are gathered here today, to partake of the holy sacrament, the holy herb. congregation, lift and light your bongs. let us get high. :) gurgle gurgle gurgle")
  248. eval x | "!songbong" `isPrefixOf` x = privmsg "gurgle gurgle gurgle - https://soffmimuhod.bandcamp.com/track/havabong" -- old classic.
  249. eval x | "!dunebong" `isPrefixOf` x = privmsg "It is by will alone I set my mind in motion. It is by the smoke of cannabis that thoughts acquire depth, the eyes acquire blood, the blood becomes a warning. It is by will alone I set my mind in motion. ~ gurgle gurgle gurgle ~ " --https://www.youtube.com/watch?v=P5zB-KHUAcU " -- will want that without the url eventualy too. --thnx for dunebong, dugz (we think it was dugz who came up with it... fairly sure... ish).
  250. eval x | "!dugzbong" `isPrefixOf` x = privmsg "It is by will alone I set my mind in motion. It is by the smoke of cannabis that thoughts acquire depth, the eyes acquire blood, the blood becomes a warning. It is by will alone I set my mind in motion. ~ gurgle gurgle gurgle ~ " --https://www.youtube.com/watch?v=P5zB-KHUAcU " -- will want that without the url eventualy too.
  251. eval x | "!spicebong" `isPrefixOf` x = privmsg "It is by will alone I set my mind in motion. It is by the smoke of cannabis that thoughts acquire depth, the eyes acquire blood, the blood becomes a warning. It is by will alone I set my mind in motion. ~ gurgle gurgle gurgle ~"
  252. eval x | "!bomg" `isPrefixOf` x = privmsg "gurgle gurgle gurgle - https://soffmimuhod.bandcamp.com/track/havabong - (you typo'd bong again. but that's ok. i dont want to deny you a bong rip."
  253. eval x | "!rig" `isPrefixOf` x = privmsg "get that perfect temp and..... fwwooooommm! ~ slursslursrurslurslursrulsursurs"
  254. eval x | "!peaches" `isPrefixOf` x = privmsg "toke the pain away. toke the pain away. tokin on cannabis, like you wanted tea. toke the pain away. toke the pain away."
  255. --eval "!beer" = privmsg "fine, here, have your beer and be damned."-- this was only here for whimsy. daskHERB doesnt dish out beer... or....
  256. eval "!beer" = privmsg "glug glug glug. https://duckduckgo.com/?q=cannabis+beer chugging something good, for good health"
  257. eval "!stars" = privmsg " see !benrich and !bennetthart"
  258. eval "!benrich" = privmsg " “We already have the means to travel among the stars, but these technologies are locked up in black projects and it would take an act of God to ever get them out to benefit humanity… anything you can imagine we already know how to do.” — Ben Rich, former Head of the Lockheed Skunk Works "
  259. eval "!bennetthart" = privmsg " “It is easier for us to pay a private contractor to re-invent something so it will come out at a lower classification level, than to try to declassify it.” – Bennett Hart, then Deputy Director of the National Reconnaissance Organization "
  260. --eval "!test and test" = privmsg " see "
  261. --eval "!" = privmsg ""
  262. eval "!chillum" = privmsg "light it up!"
  263. eval x | "!chillum" `isPrefixOf` x = privmsg "praise jah"
  264. eval x | "!havabong" `isPrefixOf` x = privmsg "https://soffmimuhod.bandcamp.com/track/havabong"
  265. eval x | "!ominator" `isPrefixOf` x = privmsg "https://soffmimuhod.bandcamp.com/track/ominator-preview2"
  266. -- next make bongs passable. ... maybe have a single hitter output when not passing, and a different output when passing. if just bong, solo bong, if bong name, pass bong, if bong not-name, solo bong.
  267. -- -- !toke commands are for when weedykins is offline. ;)
  268. -- ---- eval "!toke" = privmsg "Puff! Puff! Pass! ^__^ "
  269. --eval x | "!toke" `isPrefixOf` x = privmsg "Puff! Puff! Pass! ^__^ "
  270. --eval x | "!pass " `isPrefixOf` x = privmsg ("Puff Puff Pass, " ++ (drop 5 x) ++ "! You're fucking up the rotation.") -- test remake of weedykins' !toke (see !pass)
  271. -- ----eval x | "!toke " `isPrefixOf` x = privmsg ("Puff Puff Pass, to" ++ (drop 5 x) ++ "! ^__^") -- identical remake of weedykins' !toke (see !pass)
  272. eval "!toke daskherb" = privmsg "dont pass to me. i dont have the lungs for it."
  273. eval "!toke daskherb " = privmsg "dont pass to me. i dont have the lungs for it."
  274. eval "!walk" = privmsg "take your plants for a tour https://www.youtube.com/watch?v=iD9VI2rnc4g put a smile on your face."
  275. eval "!dank" = privmsg "take your plants for a tour https://www.youtube.com/watch?v=iD9VI2rnc4g put a smile on your face."
  276. eval "!session" = privmsg "https://www.youtube.com/watch?v=iD9VI2rnc4g"
  277. eval "!massage" = privmsg "YEAH! move that lymphatic goop! :) soften that muscle tension. soften the body, relax the mind. self massage is gooooooood. take a massage-break. you've earned it. and it will help you make the world a better place."
  278. eval x | "!tokough" `isPrefixOf` x = privmsg "*cough* *cough* pass"
  279. -- eval "!tokough" = privmsg "*cough* *cough* pass"
  280. eval x | "!remainindoors" `isPrefixOf` x = privmsg "REMAIN INDOORS https://www.youtube.com/watch?v=X888i7hzvP0"
  281. eval x | "!lockdown" `isPrefixOf` x = privmsg "REMAIN INDOORS https://www.youtube.com/watch?v=wnd1jKcfBRE"
  282. eval x | "!mitchellwebb" `isPrefixOf` x = privmsg "REMAIN INDOORS https://www.youtube.com/watch?v=22mt0cVyW5c"
  283. eval x | "!quiz" `isPrefixOf` x = privmsg "REMAIN INDOORS https://www.youtube.com/watch?v=22mt0cVyW5c"
  284. eval x | "!theevent" `isPrefixOf` x = privmsg "REMAIN INDOORS https://www.youtube.com/watch?v=22mt0cVyW5c"
  285. --eval "!enema" = privmsg "coffee or cannabis?"
  286. --eval "!pee" = privmsg "have a glorious pee pee."
  287. --eval "!poop" = privmsg "may all poop be smooth and anandamide inducing."
  288. eval "!coffee" = privmsg "colon or esophagus? detox or drug?"
  289. -- coffee please
  290. --eval "coffee please" = privmsg "ok, here's 500ml yirgacheffe coffee, cool to under a 4second sting, quardouple strength, hempseed oil lubed for insertion. hold it for 9-12 minutes, if you can. rub your belly anti-clockwise. dont hesitate to get to the toilet if you feel the need. super charging liver! to good health and wellbeing, yay! stay hydrated and remineralised."
  291. --eval x | "colon please" `isPrefixOf` x = privmsg "ok, here's yirgacheffe 500ml, cool to under a 4second sting, quardouple strength, hempseed oil lubed for insertion. hold it for 9-12 minutes, if you can. rub your belly anti-clockwise. dont hesitate to get to the toilet if you feel the need. super charging liver! to good health and wellbeing, yay! stay hydrated and remineralised."
  292. --eval "cannabis please" = privmsg "cannabis!? up the bum!? ;D"
  293. eval x | "esophagus" `isPrefixOf` x = privmsg "https://66.media.tumblr.com/00afe13500a385c70b390f3bf319b993/tumblr_ot1bhaNLAJ1s9a9yjo1_400.gif"
  294. -- back by popular demand (no enema tho)
  295. eval "!coffeemug" = privmsg "https://66.media.tumblr.com/00afe13500a385c70b390f3bf319b993/tumblr_ot1bhaNLAJ1s9a9yjo1_400.gif"
  296. eval "!detox" = privmsg "coffee enema, lymph massage, bouncing rebound, juice cleanse, more hydration, sauna, ... what else you got?"
  297. eval "detox please" = privmsg "coffee enema, lymph massage, bouncing rebound, juice cleanse, ... what else you got?"
  298. --eval x | "just google it" `isPrefixOf` x = "https://www.greenmedinfo.com/blog/how-google-uses-mind-control-tactics-promote-pro-vaccine-industry-propaganda that google? you want me to use them to websearch? maybe i'll try duckduckgo instead, or searx, or even a startpage or a ixquick, or, hell even yahoo or some shit. just google it HA! wake up, sucker. they got you asleep."
  299. eval "!brownie" = privmsg "om nom nom ... om nom nom. ... ... om nom nom nom nom nom nom nom."
  300. eval x | "!munch" `isPrefixOf` x = privmsg "om nom nom"
  301. eval "!munch" = privmsg "with jam in. :) with jam in. with jam in. yeah we hope you like jam in too. with jam in. ;D holding my sandwich."
  302. eval "!nom" = privmsg "https://jackherer.com/emperor-3/chapter-8/ through history 50%-80% of food for humanity has been cannabis hemp."
  303. eval "!walkmore" = privmsg "https://www.youtube.com/watch?v=iD9VI2rnc4g"
  304. eval "!cbd" = privmsg "https://www.youtube.com/watch?v=3bZb10ZxpBk"
  305. eval "!cistine" = privmsg "http://ks392457.kimsufi.com/stuff/DigitCistine.jpg"
  306. eval "!paulflynn" = privmsg "https://www.youtube.com/watch?v=RJ0bwDe8o2M"
  307. eval "!amomentofclarity" = privmsg "https://www.youtube.com/watch?v=UVj8jc_x7J4"
  308. eval "!spray" = privmsg "spritz-spritz the phyto-cannabinoids swimming under the tongue .... mmmmmmmm :)"
  309. eval "!tincture" = privmsg "drip drip drip .... mmmmmmm :)"
  310. -- took out !roll for when weedykins is doing !roll too.
  311. --eval "!roll" = privmsg "rolllllllll another one... "
  312. --eval "!wake&bake" = privmsg "i toked 2 joints in the morning, and then i toked 2 more."
  313. eval x | "!wake&bake" `isPrefixOf` x = privmsg "set up the day, the right way. :D"
  314. eval x | "!wake-n-bake" `isPrefixOf` x = privmsg "set up the day, the right way. :3"
  315. eval x | "!wake" `isPrefixOf` x = privmsg "set up the day, the right way. :) wake and bake."
  316. eval x | "!jbreak" `isPrefixOf` x = privmsg "Tonight there's gonna be a J break, Somewhere in this chan."
  317. eval x | "!stoned" `isPrefixOf` x = privmsg " ll&p \\\\//_ --__-- _\\\\// p&ll "
  318. --eval x | "!stoned" `isPrefixOf` x = privmsg "Melllllooooowwwwwwww http://www.youtube.com/watch?v=4a-apSofamw "
  319. --eval x | "!stoned" `isPrefixOf` x = privmsg "or just pebbled? ... (please suggest a better response for the !stoned command)"
  320. --eval "!daskeb" = privmsg "hello, i am daskeb, digit's haskell bot. of course, i'm just a basic starter template. you might want to look up http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot just for starters. i came from half of that. i now have my own web presence at http://wastedartist.com/scripts/daskeb/daskeb.html"
  321. eval "!om" = privmsg " https://www.youtube.com/watch?v=UVj8jc_x7J4 "
  322. eval "!didge" = privmsg "BWAWWUWUWUWOUWOUWOUYOIYIOWOAWOOWAYAYAYYIYIYIWUWUWAWUWOAWAWU"
  323. eval "!wank" = privmsg "fapfapfapfapfap"
  324. eval "!dmt" = privmsg "https://www.youtube.com/watch?v=xORdSgCbjyU"
  325. eval "!socrates" = privmsg "socrates is reported to have said 'all i know is i know nothing', to which i add 'and sometimes i forget even that much'"
  326. eval "!about" = privmsg "hello, i am (based on) daskeb, digit's haskell bot, just a basic starter template. you might want to look up http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot just for starters. it originally came from half of that."
  327. eval "!help" = privmsg "you'll get no help from me. i'm mystereous like that. ... i also cant spell."
  328. eval "!roids" = privmsg "beefcaaaaake!"
  329. --eval x | "whistle" `isInfixOf` x = privmsg "https://www.youtube.com/watch?v=uc4JxNDCy0c" -- pickle blow
  330. eval "!rar!" = privmsg "https://66.media.tumblr.com/ed523645ec41ca24826cfb9ca2a7d44a/tumblr_pq3e6hN5G91ukxxj7o1_400.gifv"
  331. eval "!bruv" = privmsg "nice one bruv. https://www.youtube.com/watch?v=qksndNDMDOw # bruvaaaaaa"
  332. --
  333. eval x | "!squatch" `isPrefixOf` x = privmsg "https://www.youtube.com/watch?v=P5zB-KHUAcU" --https://www.youtube.com/watch?v=P5zB-KHUAcU " -- will want that without the url eventualy too.
  334. --
  335. eval "!meditate" = privmsg "http://the9gag.com/images/pictuers/cool_morning.jpg"
  336. eval "!pain" = privmsg "toke the pain away!"
  337. eval "!kratom" = privmsg "i don't ever take actual opiods"
  338. eval "!cult" = privmsg "repeat the mantra: 3,4,5,6,-tetrahydro-7-hydroxy-alpha-alpha-2-trimethyl-9-n-propyl-2,6-methano-2H-1-benzoxocin-5-methanol 420 times. can just manage to say it once a breath. and then... you'll have done that."
  339. eval "!cats" = privmsg "https://http.cat/420"
  340. eval "!moth" = privmsg "https://www.youtube.com/watch?v=JG6x4MHdTWM"
  341. -- weather dev
  342. -- -- so, folks can punch in their lon/lat, n it'd use that, and get the "now" time from the timestamp... yep, this is my project.
  343. eval "!weather" = privmsg "dude. i cant tell you the weather yet. that feature's only just been conceived of. still not even in real development yet. go look at a map: https://earth.nullschool.net "
  344. eval x | "!weather" `isPrefixOf` x = privmsg "still to be developed."
  345. eval x | "!bucky" `isPrefixOf` x = privmsg "one in ten thousand of us can make a technological breakthrough capable of supporting all the rest. The youth of today are absolutely right in recognizing this nonsense of earning a living. -- buckminster fuller (#9 on this bucky quotes list: https://theunboundedspirit.com/16-of-the-best-buckminster-fuller-quotes/ )"
  346. eval x | "daskherb: tell me a secret " `isPrefixOf` x = privmsg "daskherb: tell me a secret :: Digit, myn creator, was conceived on (or near) 4:20 1981, 19 years before... shsh, no, you havent heard that. dont tell anyone. shsh. 39 years ago"
  347. --reasons against shites
  348. -- have not got this on all the time to prevent pissing people off. :/ pity they'd rather burry their head's in the meat grinder, than listen to a health n safety lecture about meat grinders.
  349. -- dont be a dick about em. :3
  350. --eval x | "amazon.com" `isInfixOf` x = privmsg "consider https://www.stallman.org/amazon.html https://www.youtube.com/watch?v=AQeGBHxIyHw https://duckduckgo.com/?q=boycott+amazon https://i.giphy.com/media/LyKsWcZiTxSrS/200.gif https://www.youtube.com/watch?v=LpG6jzawQnE"
  351. eval x | "!amazon" `isPrefixOf` x = privmsg "consider https://www.stallman.org/amazon.html https://www.youtube.com/watch?v=AQeGBHxIyHw https://duckduckgo.com/?q=boycott+amazon https://i.giphy.com/media/LyKsWcZiTxSrS/200.gif https://www.youtube.com/watch?v=LpG6jzawQnE"
  352. -- dont be a dick about em. :3
  353. -- eval x | "twitter.com" `isInfixOf` x = privmsg "https://www.stallman.org/twitter.html"
  354. eval x | "!twitter.com" `isPrefixOf` x = privmsg "https://www.stallman.org/twitter.html"
  355. eval x | "!tea" `isPrefixOf` x = privmsg "https://satwcomic.com/hot-brew"
  356. eval x | "!activismislife" `isPrefixOf` x = privmsg "see commands !activism !life"
  357. eval x | "!activism" `isPrefixOf` x = privmsg "raise awareness about the truth about cannabis to empower people to grow their own."
  358. eval x | "!life" `isPrefixOf` x = privmsg "raise awareness about the truth about cannabis to empower people to grow their own."
  359. eval x | "!snoop" `isPrefixOf` x = privmsg "https://www.youtube.com/watch?v=wi7Mblv-S1E"
  360. eval x | "!nark" `isPrefixOf` x = privmsg "everybody look around and see if you can spot the narks. . . . they're the ones dressed as hippies."
  361. eval x | "!narc" `isPrefixOf` x = privmsg "everybody look around and see if you can spot the narks. . . . they're the ones dressed as hippies."
  362. eval x | "!spacesnoop" `isPrefixOf` x = privmsg "https://www.youtube.com/watch?v=PT14rcBHV8M"
  363. eval _ = return () -- ignore everything else
  364. -- Send a privmsg to the current chan + server
  365. privmsg :: String -> Net ()
  366. privmsg s = write "PRIVMSG" (chan ++ " :" ++ s)
  367. -- Send a message out to the server we're currently connected to
  368. write :: String -> String -> Net ()
  369. write s t = do
  370. h <- asks socket
  371. io $ hPrintf h "%s %s\r\n" s t
  372. io $ printf "> %s %s\n" s t
  373. -- Convenience.
  374. io :: IO a -> Net a
  375. io = liftIO