{"id":32,"date":"2003-07-18T13:51:35","date_gmt":"2003-07-18T11:51:35","guid":{"rendered":"http:\/\/frenchfragfactory.net\/ozh\/archives\/2003\/07\/18\/kikoo-script-perl-version\/"},"modified":"2007-05-10T00:00:22","modified_gmt":"2007-05-09T22:00:22","slug":"kikoo-script-perl-version","status":"publish","type":"post","link":"https:\/\/planetozh.com\/blog\/2003\/07\/kikoo-script-perl-version\/","title":{"rendered":"KIKOO script, perl version"},"content":{"rendered":"<p>This is the perl version of my &quot;famous&quot; KIKOO Script for mIRC. Written for a psybnc bouncer, you can adapt it for XChat (see <a href=\"\/blog\/archives\/2001\/12\/10\/zi-kikoo-script\/\">the kikoo script<\/a>).<\/p>\n<div id=\"ig-sh-1\" class=\"syntax_hilite\">\n\n\t\t<div class=\"toolbar\">\n\n\t\t<div class=\"view-different-container\">\n\t\t\t\t\t\t<a href=\"#\" class=\"view-different\">&lt; View <span>plain text<\/span> &gt;<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t<div class=\"language-name\">perl<\/div>\n\n\t\t\n\t\t<br clear=\"both\">\n\n\t<\/div>\n\t\n\t<div class=\"code\">\n\t\t<ol class=\"perl\" style=\"font-family:monospace\"><li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #666666;font-style: italic\">#!\/usr\/bin\/perl<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #0000ff\">$nick<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #000066\">uc<\/span> <span style=\"color: #000066\">join<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #ff0000\">' '<\/span><span style=\"color: #339933\">,<\/span> <span style=\"color: #339933\">@<\/span><span style=\"color: #000000;font-weight: bold\">ARGV<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #0000ff\">$front<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #000066\">int<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #000066\">rand<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #cc66cc\">13<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #339933\">+<\/span><span style=\"color: #cc66cc\">1<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #0000ff\">$back<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #000066\">int<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #000066\">rand<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #cc66cc\">13<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #339933\">+<\/span><span style=\"color: #cc66cc\">1<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #b1b100\">while<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #0000ff\">$back<\/span> <span style=\"color: #339933\">==<\/span> <span style=\"color: #0000ff\">$front<\/span><span style=\"color: #009900\">&#041;<\/span> <span style=\"color: #009900\">&#123;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff\">$back<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #000066\">int<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #000066\">rand<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #cc66cc\">13<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #339933\">+<\/span><span style=\"color: #cc66cc\">1<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #009900\">&#125;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #0000ff\">$xclam<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #000066\">int<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #000066\">rand<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #cc66cc\">11<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #339933\">+<\/span><span style=\"color: #cc66cc\">2<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #0000ff\">$oo<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #000066\">int<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #000066\">rand<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #cc66cc\">11<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #339933\">+<\/span><span style=\"color: #cc66cc\">2<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #0000ff\">$par<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #000066\">int<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #000066\">rand<\/span><span style=\"color: #009900\">&#040;<\/span><span style=\"color: #cc66cc\">11<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #009900\">&#041;<\/span><span style=\"color: #339933\">+<\/span><span style=\"color: #cc66cc\">2<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp;<\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #0000ff\">$output<\/span> <span style=\"color: #339933\">=<\/span> <span style=\"color: #ff0000\">&quot;<span style=\"color: #000099;font-weight: bold\">\\0<\/span>02<span style=\"color: #000099;font-weight: bold\">\\0<\/span>03&quot;<\/span> <span style=\"color: #339933\">.<\/span> <span style=\"color: #ff0000\">&quot;$front,$back&quot;<\/span> <span style=\"color: #339933\">.<\/span> <span style=\"color: #ff0000\">&quot; KIKOO&quot;<\/span> <span style=\"color: #339933\">.<\/span> <span style=\"color: #ff0000\">&quot;O&quot;<\/span> x <span style=\"color: #0000ff\">$oo<\/span> <span style=\"color: #339933\">.<\/span> <span style=\"color: #ff0000\">&quot; $nick &quot;<\/span> <span style=\"color: #339933\">.<\/span> <span style=\"color: #ff0000\">&quot;!&quot;<\/span> x <span style=\"color: #0000ff\">$xclam<\/span> <span style=\"color: #339933\">.<\/span> <span style=\"color: #ff0000\">&quot; :o&quot;<\/span> <span style=\"color: #339933\">.<\/span> <span style=\"color: #ff0000\">&quot;)&quot;<\/span> x <span style=\"color: #0000ff\">$par<\/span> <span style=\"color: #339933\">.<\/span><span style=\"color: #ff0000\">&quot; &quot;<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #000066\">print<\/span> <span style=\"color: #ff0000\">&quot;PRIVMSG &amp;&amp;partyline :$output<span style=\"color: #000099;font-weight: bold\">\\n<\/span>&quot;<\/span><span style=\"color: #339933\">;<\/span><\/div><\/li>\n<\/ol>\t<\/div>\n\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>KIKOO script in perl (mostly for XChat or a psybnc bouncer)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[2,41,40,9],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","tag-code","tag-irc","tag-kikoo","tag-perl"],"_links":{"self":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":0,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"wp:attachment":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}