From 03929dac2a29664878d2c971648a4fe1fb698462 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 22:19:02 +0200 Subject: Adding upstream version 20231031. Signed-off-by: Daniel Baumann --- scripts/0x0st.pl | 215 ++ scripts/8-ball.pl | 131 + scripts/Cirssi.pl | 802 +++++ scripts/UNIBG-autoident.pl | 242 ++ scripts/XMMSInfo.pm | 308 ++ scripts/accent.pl | 153 + scripts/act.pl | 54 + scripts/active_notice.pl | 207 ++ scripts/active_notify.pl | 157 + scripts/adv_windowlist.pl | 2988 ++++++++++++++++++ scripts/ai.pl | 265 ++ scripts/aidle.pl | 80 + scripts/akftp.pl | 96 + scripts/akilluser.pl | 92 + scripts/alame.pl | 36 + scripts/anotherway.pl | 54 + scripts/antiplenk.pl | 47 + scripts/apm.pl | 122 + scripts/armeija.pl | 267 ++ scripts/ascii.pl | 405 +++ scripts/auto_away.pl | 90 + scripts/auto_whois.pl | 80 + scripts/autoaway.pl | 130 + scripts/autochannel.pl | 69 + scripts/autocycle.pl | 47 + scripts/autolimit.pl | 53 + scripts/autoopper.pl | 412 +++ scripts/autorealname.pl | 304 ++ scripts/autorejoinpunish.pl | 124 + scripts/autoreminder.pl | 147 + scripts/autoversion.pl | 25 + scripts/autovoice.pl | 684 ++++ scripts/autowhois.pl | 39 + scripts/autowrap.pl | 38 + scripts/away.pl | 199 ++ scripts/away2web.pl | 58 + scripts/away_hilight_notice.pl | 215 ++ scripts/away_verbose.pl | 234 ++ scripts/awaybar.pl | 44 + scripts/awaylogcnt.pl | 59 + scripts/awayproxy.pl | 279 ++ scripts/badword.pl | 163 + scripts/ban.pl | 394 +++ scripts/bandwidth.pl | 115 + scripts/bansearch.pl | 421 +++ scripts/bantime.pl | 110 + scripts/beep.pl | 50 + scripts/beep_beep.pl | 54 + scripts/beepaway.pl | 41 + scripts/bestoiber.pl | 61 + scripts/bgta.pl | 284 ++ scripts/binary.pl | 114 + scripts/bitlbee_blist.pl | 77 + scripts/bitlbee_join_notice.pl | 109 + scripts/bitlbee_nick_change.pl | 72 + scripts/bitlbee_tab_completion.pl | 88 + scripts/bitlbee_typing_notice.pl | 349 +++ scripts/blowjob.pl | 555 ++++ scripts/bmi.pl | 45 + scripts/calc.pl | 30 + scripts/callerid.pl | 135 + scripts/cap_sasl.pl | 437 +++ scripts/centericq.pl | 342 ++ scripts/cgrep.pl | 192 ++ scripts/challenge.pl | 106 + scripts/chanact.pl | 756 +++++ scripts/chanfull.pl | 48 + scripts/chanfull_duden.pl | 47 + scripts/chankeys.pl | 570 ++++ scripts/chanpeak.pl | 182 ++ scripts/chansearch.pl | 300 ++ scripts/chanshare.pl | 122 + scripts/chansort.pl | 79 + scripts/chansync.pl | 75 + scripts/chops.pl | 144 + scripts/cleanpublic.pl | 41 + scripts/clipboard.pl | 90 + scripts/cloneprot.pl | 89 + scripts/clones.pl | 55 + scripts/colored_nicks.pl | 479 +++ scripts/colorize_nicks.pl | 217 ++ scripts/colorkick.pl | 69 + scripts/connectcmd.pl | 165 + scripts/copy.pl | 290 ++ scripts/countdown.pl | 59 + scripts/country.pl | 325 ++ scripts/cp1250_kick.pl | 65 + scripts/crapbuster.pl | 45 + scripts/cron.pl | 306 ++ scripts/ctrlact.pl | 1087 +++++++ scripts/cubes.pl | 55 + scripts/cwho.pl | 79 + scripts/dancer_forwardfix.pl | 58 + scripts/dancer_hide_477.pl | 54 + scripts/dau.pl | 5750 ++++++++++++++++++++++++++++++++++ scripts/dcc_ip.pl | 117 + scripts/dccmove.pl | 43 + scripts/dccself.pl | 38 + scripts/dccstat.pl | 501 +++ scripts/defaultchanmode.pl | 98 + scripts/desktop-notify.pl | 120 + scripts/df.pl | 157 + scripts/dice.pl | 191 ++ scripts/dictcomplete.pl | 78 + scripts/dim_nicks.pl | 431 +++ scripts/discord_unbridge.pl | 45 + scripts/dispatch.pl | 26 + scripts/doc.pl | 276 ++ scripts/doublefilter.pl | 113 + scripts/dtach_away.pl | 209 ++ scripts/duckduckgo.pl | 256 ++ scripts/elist.pl | 137 + scripts/eliza.pl | 107 + scripts/email_msgs.pl | 305 ++ scripts/emaildb.pl | 131 + scripts/emaildb1.0.pl | 0 scripts/eng_no_translate_dpryo.pl | 57 + scripts/events.pl | 54 + scripts/exec_clean.pl | 52 + scripts/fakectcp.pl | 277 ++ scripts/figlet.pl | 58 + scripts/file.pl | 102 + scripts/find.pl | 45 + scripts/findbot.pl | 984 ++++++ scripts/fleech.pl | 948 ++++++ scripts/fnotify.pl | 140 + scripts/follow.pl | 72 + scripts/foo.pl | 75 + scripts/foreach_user.pl | 59 + scripts/fortune.pl | 124 + scripts/forward.pl | 128 + scripts/fpaste.pl | 264 ++ scripts/freenode_filter.pl | 122 + scripts/friends_shasta.pl | 2719 ++++++++++++++++ scripts/fserve.pl | 3578 +++++++++++++++++++++ scripts/fuckem.pl | 86 + scripts/getop.pl | 387 +++ scripts/gimmie.pl | 39 + scripts/gitscriptassist.pl | 631 ++++ scripts/go.pl | 115 + scripts/go2.pl | 495 +++ scripts/google.pl | 224 ++ scripts/gpgvalidator.pl | 224 ++ scripts/grep.pl | 82 + scripts/guts.pl | 21 + scripts/hddtemp.pl | 183 ++ scripts/hello.pl | 55 + scripts/hide.pl | 177 ++ scripts/hideauth.pl | 63 + scripts/hideshow.pl | 319 ++ scripts/highlite.pl | 113 + scripts/hignore.pl | 78 + scripts/hilightwin.pl | 85 + scripts/history_search.pl | 146 + scripts/hl.pl | 53 + scripts/hlbot.pl | 217 ++ scripts/hostname.pl | 157 + scripts/iMPD.pl | 1179 +++++++ scripts/identify-md5.pl | 168 + scripts/idlesince.pl | 32 + scripts/idletime.pl | 70 + scripts/idonkey.pl | 1408 +++++++++ scripts/ignore_log.pl | 78 + scripts/ignoreoc.pl | 65 + scripts/il.pl | 133 + scripts/imdb.pl | 115 + scripts/intercept.pl | 217 ++ scripts/invitejoin.pl | 298 ++ scripts/ipupdate.pl | 39 + scripts/irccomplete.pl | 213 ++ scripts/ircgallery.pl | 257 ++ scripts/ircgmessagenotify.pl | 218 ++ scripts/ircops.pl | 44 + scripts/ircsec.pl | 205 ++ scripts/irssiBlaster.pl | 446 +++ scripts/isdn.pl | 58 + scripts/itime.pl | 47 + scripts/ixmmsa.pl | 63 + scripts/joininfo.pl | 1097 +++++++ scripts/kban-referrals.pl | 372 +++ scripts/kblamehost.pl | 65 + scripts/keepnick.pl | 387 +++ scripts/kenny.pl | 92 + scripts/kernel.pl | 37 + scripts/kicks.pl | 253 ++ scripts/kill_fake_gets.pl | 131 + scripts/kline_warning.pl | 147 + scripts/l33tmusic.pl | 283 ++ scripts/lastspoke.pl | 210 ++ scripts/len.pl | 374 +++ scripts/leodict.pl | 435 +++ scripts/licq.pl | 66 + scripts/linkchan.pl | 488 +++ scripts/listen.pl | 163 + scripts/loadavg.pl | 47 + scripts/localize.pl | 1642 ++++++++++ scripts/log2ansi.pl | 419 +++ scripts/logcompress.pl | 24 + scripts/logresume.pl | 253 ++ scripts/ls.pl | 40 + scripts/mailcheck_imap.pl | 566 ++++ scripts/mailcheck_mbox_flux.pl | 126 + scripts/mailcheck_pop3_kimmo.pl | 120 + scripts/mangle.pl | 721 +++++ scripts/map.pl | 129 + scripts/mass_hilight_blocker.pl | 62 + scripts/miodek.pl | 368 +++ scripts/mkick.pl | 114 + scripts/mkshorterlink.pl | 219 ++ scripts/mldonkey_bandwidth.pl | 51 + scripts/modelist-r.pl | 468 +++ scripts/modelist.pl | 153 + scripts/mood.pl | 202 ++ scripts/morse.pl | 347 ++ scripts/mouse.pl | 168 + scripts/mpg123.pl | 86 + scripts/multipaste.pl | 151 + scripts/my_beep.pl | 61 + scripts/mygoogle.pl | 114 + scripts/myimdb.pl | 114 + scripts/mysqlurllogger.pl | 82 + scripts/nact.pl | 335 ++ scripts/news.pl | 282 ++ scripts/newsline.pl | 453 +++ scripts/nickban.pl | 66 + scripts/nickcolor_expando.pl | 1065 +++++++ scripts/nickident.pl | 230 ++ scripts/nickignore.pl | 49 + scripts/nicklist.pl | 828 +++++ scripts/nickmix-c0ffee.pl | 89 + scripts/nickmix_pasky.pl | 74 + scripts/nickserv.pl | 684 ++++ scripts/niq.pl | 296 ++ scripts/nocaps.pl | 96 + scripts/nocollide.pl | 118 + scripts/noisyquery.pl | 33 + scripts/nopl.pl | 66 + scripts/norepeat.pl | 76 + scripts/noteserve.pl | 89 + scripts/noticemove.pl | 49 + scripts/notonline.pl | 76 + scripts/ogg123.pl | 95 + scripts/oidenty.pl | 75 + scripts/on.pl | 287 ++ scripts/ontv.pl | 339 ++ scripts/oops.pl | 90 + scripts/oopsie.pl | 50 + scripts/openurl.pl | 269 ++ scripts/operit.pl | 320 ++ scripts/operview.pl | 422 +++ scripts/opnotice.pl | 56 + scripts/opnotify.pl | 47 + scripts/osd.pl | 313 ++ scripts/page-c0ffee.pl | 116 + scripts/page_reeler.pl | 47 + scripts/pager.pl | 127 + scripts/pangotext.pl | 253 ++ scripts/paste-derwan.pl | 184 ++ scripts/paste_derwan.pl | 381 +++ scripts/paste_huggie.pl | 187 ++ scripts/paste_kimmoke.pl | 110 + scripts/pelix.pl | 235 ++ scripts/perlalias.pl | 1026 ++++++ scripts/pggb_sound.pl | 251 ++ scripts/phpdoc.pl | 134 + scripts/poison.pl | 341 ++ scripts/postpone.pl | 119 + scripts/ppl.pl | 210 ++ scripts/print_signals.pl | 319 ++ scripts/q_username.pl | 26 + scripts/query-connection-notifier.pl | 67 + scripts/query.pl | 593 ++++ scripts/queryresume.pl | 64 + scripts/quiet.pl | 90 + scripts/quitrand.pl | 52 + scripts/quiz.pl | 451 +++ scripts/quizgr.pl | 655 ++++ scripts/quizmaster.pl | 354 +++ scripts/rainbow.pl | 173 + scripts/randaway.pl | 119 + scripts/randname.pl | 46 + scripts/relm.pl | 93 + scripts/remote.pl | 91 + scripts/repeat.pl | 144 + scripts/resize_split.pl | 62 + scripts/revolve.pl | 388 +++ scripts/rk.pl | 53 + scripts/romaji.pl | 273 ++ scripts/romajibind.pl | 301 ++ scripts/rot13.pl | 77 + scripts/rotator.pl | 138 + scripts/sana.pl | 66 + scripts/sana_cmd.pl | 57 + scripts/schwaebisch.pl | 191 ++ scripts/screen_away.pl | 248 ++ scripts/scripthelp.pl | 39 + scripts/scriptinfo.pl | 118 + scripts/scroller.pl | 97 + scripts/seen.pl | 1198 +++++++ scripts/servercomplete.pl | 85 + scripts/seti.pl | 50 + scripts/shortenurl.pl | 170 + scripts/showhilight.pl | 32 + scripts/showhost.pl | 68 + scripts/showmode.pl | 83 + scripts/smiley.pl | 43 + scripts/sms.pl | 439 +++ scripts/snmpup.pl | 101 + scripts/spambot.pl | 80 + scripts/special_complete.pl | 30 + scripts/spellcheck.pl | 301 ++ scripts/sping.pl | 41 + scripts/stocks.pl | 431 +++ scripts/synccheck.pl | 346 ++ scripts/sysinfo277-irssi.pl | 546 ++++ scripts/sysinfo_dg.pl | 330 ++ scripts/sysinfoplus.pl | 107 + scripts/tab_stop.pl | 61 + scripts/talk.pl | 274 ++ scripts/target.pl | 163 + scripts/thankop.pl | 134 + scripts/theme.pl | 451 +++ scripts/thistory.pl | 162 + scripts/tictactoe.pl | 665 ++++ scripts/timer.pl | 177 ++ scripts/tinyurl.pl | 47 + scripts/title.pl | 150 + scripts/tlock.pl | 81 + scripts/tmux-nicklist-portable.pl | 432 +++ scripts/topic-diff.pl | 86 + scripts/topics.pl | 126 + scripts/topicsed.pl | 61 + scripts/track.pl | 310 ++ scripts/trackbar.pl | 606 ++++ scripts/tracknick.pl | 201 ++ scripts/trigger.pl | 1300 ++++++++ scripts/trustweb.pl | 374 +++ scripts/tvmusor.pl | 143 + scripts/twirssi.pl | 4217 +++++++++++++++++++++++++ scripts/twprompt.pl | 100 + scripts/twsocials.pl | 1154 +++++++ scripts/twtopic.pl | 120 + scripts/u.pl | 69 + scripts/upgradeinfo.pl | 87 + scripts/uptime.pl | 138 + scripts/url.pl | 329 ++ scripts/url_log.pl | 399 +++ scripts/urlfeed.pl | 262 ++ scripts/urlgrab.pl | 71 + scripts/urlplot.pl | 841 +++++ scripts/urlwindow.pl | 47 + scripts/userhost.pl | 103 + scripts/users.pl | 270 ++ scripts/version-stat.pl | 88 + scripts/verstats.pl | 81 + scripts/vowels.pl | 93 + scripts/warnkick.pl | 71 + scripts/washnicks.pl | 79 + scripts/watch.pl | 179 ++ scripts/whitelist.pl | 445 +++ scripts/whois.pl | 38 + scripts/whos.pl | 109 + scripts/wilm.pl | 54 + scripts/wkb.pl | 68 + scripts/wlstat.pl | 669 ++++ scripts/wordcompletition.pl | 144 + scripts/wordscramble.pl | 160 + scripts/xauth.pl | 546 ++++ scripts/xcmd.pl | 65 + scripts/xdccget.pl | 650 ++++ scripts/xetra.pl | 209 ++ scripts/xlist.pl | 65 + scripts/xmms.pl | 161 + scripts/xmms2.pl | 86 + scripts/xmmsinfo.pl | 116 + scripts/xqf.pl | 238 ++ 376 files changed, 99772 insertions(+) create mode 100644 scripts/0x0st.pl create mode 100644 scripts/8-ball.pl create mode 100644 scripts/Cirssi.pl create mode 100644 scripts/UNIBG-autoident.pl create mode 100644 scripts/XMMSInfo.pm create mode 100644 scripts/accent.pl create mode 100644 scripts/act.pl create mode 100644 scripts/active_notice.pl create mode 100644 scripts/active_notify.pl create mode 100644 scripts/adv_windowlist.pl create mode 100644 scripts/ai.pl create mode 100644 scripts/aidle.pl create mode 100644 scripts/akftp.pl create mode 100644 scripts/akilluser.pl create mode 100644 scripts/alame.pl create mode 100644 scripts/anotherway.pl create mode 100644 scripts/antiplenk.pl create mode 100644 scripts/apm.pl create mode 100644 scripts/armeija.pl create mode 100644 scripts/ascii.pl create mode 100644 scripts/auto_away.pl create mode 100644 scripts/auto_whois.pl create mode 100644 scripts/autoaway.pl create mode 100644 scripts/autochannel.pl create mode 100644 scripts/autocycle.pl create mode 100644 scripts/autolimit.pl create mode 100644 scripts/autoopper.pl create mode 100644 scripts/autorealname.pl create mode 100644 scripts/autorejoinpunish.pl create mode 100644 scripts/autoreminder.pl create mode 100644 scripts/autoversion.pl create mode 100644 scripts/autovoice.pl create mode 100644 scripts/autowhois.pl create mode 100644 scripts/autowrap.pl create mode 100644 scripts/away.pl create mode 100644 scripts/away2web.pl create mode 100644 scripts/away_hilight_notice.pl create mode 100644 scripts/away_verbose.pl create mode 100644 scripts/awaybar.pl create mode 100644 scripts/awaylogcnt.pl create mode 100644 scripts/awayproxy.pl create mode 100644 scripts/badword.pl create mode 100644 scripts/ban.pl create mode 100644 scripts/bandwidth.pl create mode 100644 scripts/bansearch.pl create mode 100644 scripts/bantime.pl create mode 100644 scripts/beep.pl create mode 100644 scripts/beep_beep.pl create mode 100644 scripts/beepaway.pl create mode 100644 scripts/bestoiber.pl create mode 100644 scripts/bgta.pl create mode 100644 scripts/binary.pl create mode 100644 scripts/bitlbee_blist.pl create mode 100644 scripts/bitlbee_join_notice.pl create mode 100644 scripts/bitlbee_nick_change.pl create mode 100644 scripts/bitlbee_tab_completion.pl create mode 100644 scripts/bitlbee_typing_notice.pl create mode 100644 scripts/blowjob.pl create mode 100644 scripts/bmi.pl create mode 100644 scripts/calc.pl create mode 100644 scripts/callerid.pl create mode 100644 scripts/cap_sasl.pl create mode 100644 scripts/centericq.pl create mode 100644 scripts/cgrep.pl create mode 100644 scripts/challenge.pl create mode 100644 scripts/chanact.pl create mode 100644 scripts/chanfull.pl create mode 100644 scripts/chanfull_duden.pl create mode 100644 scripts/chankeys.pl create mode 100644 scripts/chanpeak.pl create mode 100644 scripts/chansearch.pl create mode 100644 scripts/chanshare.pl create mode 100644 scripts/chansort.pl create mode 100644 scripts/chansync.pl create mode 100644 scripts/chops.pl create mode 100644 scripts/cleanpublic.pl create mode 100644 scripts/clipboard.pl create mode 100644 scripts/cloneprot.pl create mode 100644 scripts/clones.pl create mode 100644 scripts/colored_nicks.pl create mode 100644 scripts/colorize_nicks.pl create mode 100644 scripts/colorkick.pl create mode 100644 scripts/connectcmd.pl create mode 100644 scripts/copy.pl create mode 100644 scripts/countdown.pl create mode 100644 scripts/country.pl create mode 100644 scripts/cp1250_kick.pl create mode 100644 scripts/crapbuster.pl create mode 100644 scripts/cron.pl create mode 100644 scripts/ctrlact.pl create mode 100644 scripts/cubes.pl create mode 100644 scripts/cwho.pl create mode 100644 scripts/dancer_forwardfix.pl create mode 100644 scripts/dancer_hide_477.pl create mode 100644 scripts/dau.pl create mode 100644 scripts/dcc_ip.pl create mode 100644 scripts/dccmove.pl create mode 100644 scripts/dccself.pl create mode 100644 scripts/dccstat.pl create mode 100644 scripts/defaultchanmode.pl create mode 100644 scripts/desktop-notify.pl create mode 100644 scripts/df.pl create mode 100644 scripts/dice.pl create mode 100644 scripts/dictcomplete.pl create mode 100644 scripts/dim_nicks.pl create mode 100644 scripts/discord_unbridge.pl create mode 100644 scripts/dispatch.pl create mode 100644 scripts/doc.pl create mode 100644 scripts/doublefilter.pl create mode 100644 scripts/dtach_away.pl create mode 100644 scripts/duckduckgo.pl create mode 100644 scripts/elist.pl create mode 100644 scripts/eliza.pl create mode 100644 scripts/email_msgs.pl create mode 100644 scripts/emaildb.pl create mode 100644 scripts/emaildb1.0.pl create mode 100644 scripts/eng_no_translate_dpryo.pl create mode 100644 scripts/events.pl create mode 100644 scripts/exec_clean.pl create mode 100644 scripts/fakectcp.pl create mode 100644 scripts/figlet.pl create mode 100644 scripts/file.pl create mode 100644 scripts/find.pl create mode 100644 scripts/findbot.pl create mode 100644 scripts/fleech.pl create mode 100644 scripts/fnotify.pl create mode 100644 scripts/follow.pl create mode 100644 scripts/foo.pl create mode 100644 scripts/foreach_user.pl create mode 100644 scripts/fortune.pl create mode 100644 scripts/forward.pl create mode 100644 scripts/fpaste.pl create mode 100644 scripts/freenode_filter.pl create mode 100644 scripts/friends_shasta.pl create mode 100644 scripts/fserve.pl create mode 100644 scripts/fuckem.pl create mode 100644 scripts/getop.pl create mode 100644 scripts/gimmie.pl create mode 100644 scripts/gitscriptassist.pl create mode 100644 scripts/go.pl create mode 100644 scripts/go2.pl create mode 100644 scripts/google.pl create mode 100644 scripts/gpgvalidator.pl create mode 100644 scripts/grep.pl create mode 100644 scripts/guts.pl create mode 100644 scripts/hddtemp.pl create mode 100644 scripts/hello.pl create mode 100644 scripts/hide.pl create mode 100644 scripts/hideauth.pl create mode 100644 scripts/hideshow.pl create mode 100644 scripts/highlite.pl create mode 100644 scripts/hignore.pl create mode 100644 scripts/hilightwin.pl create mode 100644 scripts/history_search.pl create mode 100644 scripts/hl.pl create mode 100644 scripts/hlbot.pl create mode 100644 scripts/hostname.pl create mode 100644 scripts/iMPD.pl create mode 100644 scripts/identify-md5.pl create mode 100644 scripts/idlesince.pl create mode 100644 scripts/idletime.pl create mode 100644 scripts/idonkey.pl create mode 100644 scripts/ignore_log.pl create mode 100644 scripts/ignoreoc.pl create mode 100644 scripts/il.pl create mode 100644 scripts/imdb.pl create mode 100644 scripts/intercept.pl create mode 100644 scripts/invitejoin.pl create mode 100644 scripts/ipupdate.pl create mode 100644 scripts/irccomplete.pl create mode 100644 scripts/ircgallery.pl create mode 100644 scripts/ircgmessagenotify.pl create mode 100644 scripts/ircops.pl create mode 100644 scripts/ircsec.pl create mode 100644 scripts/irssiBlaster.pl create mode 100644 scripts/isdn.pl create mode 100644 scripts/itime.pl create mode 100644 scripts/ixmmsa.pl create mode 100644 scripts/joininfo.pl create mode 100644 scripts/kban-referrals.pl create mode 100644 scripts/kblamehost.pl create mode 100644 scripts/keepnick.pl create mode 100644 scripts/kenny.pl create mode 100644 scripts/kernel.pl create mode 100644 scripts/kicks.pl create mode 100644 scripts/kill_fake_gets.pl create mode 100644 scripts/kline_warning.pl create mode 100644 scripts/l33tmusic.pl create mode 100644 scripts/lastspoke.pl create mode 100644 scripts/len.pl create mode 100644 scripts/leodict.pl create mode 100644 scripts/licq.pl create mode 100644 scripts/linkchan.pl create mode 100644 scripts/listen.pl create mode 100644 scripts/loadavg.pl create mode 100644 scripts/localize.pl create mode 100644 scripts/log2ansi.pl create mode 100644 scripts/logcompress.pl create mode 100644 scripts/logresume.pl create mode 100644 scripts/ls.pl create mode 100644 scripts/mailcheck_imap.pl create mode 100644 scripts/mailcheck_mbox_flux.pl create mode 100644 scripts/mailcheck_pop3_kimmo.pl create mode 100644 scripts/mangle.pl create mode 100644 scripts/map.pl create mode 100644 scripts/mass_hilight_blocker.pl create mode 100644 scripts/miodek.pl create mode 100644 scripts/mkick.pl create mode 100644 scripts/mkshorterlink.pl create mode 100644 scripts/mldonkey_bandwidth.pl create mode 100644 scripts/modelist-r.pl create mode 100644 scripts/modelist.pl create mode 100644 scripts/mood.pl create mode 100644 scripts/morse.pl create mode 100644 scripts/mouse.pl create mode 100644 scripts/mpg123.pl create mode 100644 scripts/multipaste.pl create mode 100644 scripts/my_beep.pl create mode 100644 scripts/mygoogle.pl create mode 100644 scripts/myimdb.pl create mode 100644 scripts/mysqlurllogger.pl create mode 100644 scripts/nact.pl create mode 100644 scripts/news.pl create mode 100644 scripts/newsline.pl create mode 100644 scripts/nickban.pl create mode 100644 scripts/nickcolor_expando.pl create mode 100644 scripts/nickident.pl create mode 100644 scripts/nickignore.pl create mode 100644 scripts/nicklist.pl create mode 100644 scripts/nickmix-c0ffee.pl create mode 100644 scripts/nickmix_pasky.pl create mode 100644 scripts/nickserv.pl create mode 100644 scripts/niq.pl create mode 100644 scripts/nocaps.pl create mode 100644 scripts/nocollide.pl create mode 100644 scripts/noisyquery.pl create mode 100644 scripts/nopl.pl create mode 100644 scripts/norepeat.pl create mode 100644 scripts/noteserve.pl create mode 100644 scripts/noticemove.pl create mode 100644 scripts/notonline.pl create mode 100644 scripts/ogg123.pl create mode 100644 scripts/oidenty.pl create mode 100644 scripts/on.pl create mode 100644 scripts/ontv.pl create mode 100644 scripts/oops.pl create mode 100644 scripts/oopsie.pl create mode 100644 scripts/openurl.pl create mode 100644 scripts/operit.pl create mode 100644 scripts/operview.pl create mode 100644 scripts/opnotice.pl create mode 100644 scripts/opnotify.pl create mode 100644 scripts/osd.pl create mode 100644 scripts/page-c0ffee.pl create mode 100644 scripts/page_reeler.pl create mode 100644 scripts/pager.pl create mode 100644 scripts/pangotext.pl create mode 100644 scripts/paste-derwan.pl create mode 100644 scripts/paste_derwan.pl create mode 100644 scripts/paste_huggie.pl create mode 100644 scripts/paste_kimmoke.pl create mode 100644 scripts/pelix.pl create mode 100644 scripts/perlalias.pl create mode 100644 scripts/pggb_sound.pl create mode 100644 scripts/phpdoc.pl create mode 100644 scripts/poison.pl create mode 100644 scripts/postpone.pl create mode 100644 scripts/ppl.pl create mode 100644 scripts/print_signals.pl create mode 100644 scripts/q_username.pl create mode 100644 scripts/query-connection-notifier.pl create mode 100644 scripts/query.pl create mode 100644 scripts/queryresume.pl create mode 100644 scripts/quiet.pl create mode 100644 scripts/quitrand.pl create mode 100644 scripts/quiz.pl create mode 100644 scripts/quizgr.pl create mode 100644 scripts/quizmaster.pl create mode 100644 scripts/rainbow.pl create mode 100644 scripts/randaway.pl create mode 100644 scripts/randname.pl create mode 100644 scripts/relm.pl create mode 100644 scripts/remote.pl create mode 100644 scripts/repeat.pl create mode 100644 scripts/resize_split.pl create mode 100644 scripts/revolve.pl create mode 100644 scripts/rk.pl create mode 100644 scripts/romaji.pl create mode 100644 scripts/romajibind.pl create mode 100644 scripts/rot13.pl create mode 100644 scripts/rotator.pl create mode 100644 scripts/sana.pl create mode 100644 scripts/sana_cmd.pl create mode 100644 scripts/schwaebisch.pl create mode 100644 scripts/screen_away.pl create mode 100644 scripts/scripthelp.pl create mode 100644 scripts/scriptinfo.pl create mode 100644 scripts/scroller.pl create mode 100644 scripts/seen.pl create mode 100644 scripts/servercomplete.pl create mode 100644 scripts/seti.pl create mode 100644 scripts/shortenurl.pl create mode 100644 scripts/showhilight.pl create mode 100644 scripts/showhost.pl create mode 100644 scripts/showmode.pl create mode 100644 scripts/smiley.pl create mode 100644 scripts/sms.pl create mode 100644 scripts/snmpup.pl create mode 100644 scripts/spambot.pl create mode 100644 scripts/special_complete.pl create mode 100644 scripts/spellcheck.pl create mode 100644 scripts/sping.pl create mode 100644 scripts/stocks.pl create mode 100644 scripts/synccheck.pl create mode 100644 scripts/sysinfo277-irssi.pl create mode 100644 scripts/sysinfo_dg.pl create mode 100644 scripts/sysinfoplus.pl create mode 100644 scripts/tab_stop.pl create mode 100644 scripts/talk.pl create mode 100644 scripts/target.pl create mode 100644 scripts/thankop.pl create mode 100644 scripts/theme.pl create mode 100644 scripts/thistory.pl create mode 100644 scripts/tictactoe.pl create mode 100644 scripts/timer.pl create mode 100644 scripts/tinyurl.pl create mode 100644 scripts/title.pl create mode 100644 scripts/tlock.pl create mode 100644 scripts/tmux-nicklist-portable.pl create mode 100644 scripts/topic-diff.pl create mode 100644 scripts/topics.pl create mode 100644 scripts/topicsed.pl create mode 100644 scripts/track.pl create mode 100644 scripts/trackbar.pl create mode 100644 scripts/tracknick.pl create mode 100644 scripts/trigger.pl create mode 100644 scripts/trustweb.pl create mode 100644 scripts/tvmusor.pl create mode 100644 scripts/twirssi.pl create mode 100644 scripts/twprompt.pl create mode 100644 scripts/twsocials.pl create mode 100644 scripts/twtopic.pl create mode 100644 scripts/u.pl create mode 100644 scripts/upgradeinfo.pl create mode 100644 scripts/uptime.pl create mode 100644 scripts/url.pl create mode 100644 scripts/url_log.pl create mode 100644 scripts/urlfeed.pl create mode 100644 scripts/urlgrab.pl create mode 100644 scripts/urlplot.pl create mode 100644 scripts/urlwindow.pl create mode 100644 scripts/userhost.pl create mode 100644 scripts/users.pl create mode 100644 scripts/version-stat.pl create mode 100644 scripts/verstats.pl create mode 100644 scripts/vowels.pl create mode 100644 scripts/warnkick.pl create mode 100644 scripts/washnicks.pl create mode 100644 scripts/watch.pl create mode 100644 scripts/whitelist.pl create mode 100644 scripts/whois.pl create mode 100644 scripts/whos.pl create mode 100644 scripts/wilm.pl create mode 100644 scripts/wkb.pl create mode 100644 scripts/wlstat.pl create mode 100644 scripts/wordcompletition.pl create mode 100644 scripts/wordscramble.pl create mode 100644 scripts/xauth.pl create mode 100644 scripts/xcmd.pl create mode 100644 scripts/xdccget.pl create mode 100644 scripts/xetra.pl create mode 100644 scripts/xlist.pl create mode 100644 scripts/xmms.pl create mode 100644 scripts/xmms2.pl create mode 100644 scripts/xmmsinfo.pl create mode 100644 scripts/xqf.pl (limited to 'scripts') diff --git a/scripts/0x0st.pl b/scripts/0x0st.pl new file mode 100644 index 0000000..be57ba1 --- /dev/null +++ b/scripts/0x0st.pl @@ -0,0 +1,215 @@ +use strict; +use vars qw($VERSION %IRSSI); + +use POSIX; +use Irssi; +use HTTP::Request::Common; +use LWP::UserAgent; +use Storable qw/store_fd fd_retrieve/; +use File::Glob qw/:bsd_glob/; + +$VERSION = '0.04'; +%IRSSI = ( + authors => 'bw1', + contact => 'bw1@aol.at', + name => '0x0st', + description => 'upload file to https://0x0.st/', + license => 'ISC', + url => 'https://scripts.irssi.org/', + changed => '2021-01-13', + modules => 'POSIX HTTP::Request::Common LWP::UserAgent Storable File::Glob', + commands=> '0x0st', + selfcheckcmd=> '0x0st -c', +); + +my $help = << "END"; +%9Name%9 + $IRSSI{name} +%9Version%9 + $VERSION +%9Syntax%9 + /0x0st [-p] [-s | -u | file ] + /0x0st -c +%9Description%9 + $IRSSI{description} + -p past url to channel + -s shorten url + -u file from url + -c self check +%9See also%9 + https://0x0.st/ + https://github.com/lachs0r/0x0 +END + +my $test_str; + +my $base_uri; + +my %bg_process= (); +my $self_check_timer; + +sub background { + my ($cmd) =@_; + my ($fh_r, $fh_w); + pipe $fh_r, $fh_w; + my $pid = fork(); + if ($pid ==0 ) { + my @res; + @res= &{$cmd->{cmd}}(@{$cmd->{args}}); + store_fd \@res, $fh_w; + close $fh_w; + POSIX::_exit(1); + } else { + $cmd->{fh_r}=$fh_r; + Irssi::pidwait_add($pid); + $bg_process{$pid}=$cmd; + } +} + +sub sig_pidwait { + my ($pid, $status) = @_; + if (exists $bg_process{$pid}) { + my @res= @{ fd_retrieve($bg_process{$pid}->{fh_r})}; + $bg_process{$pid}->{res}=[@res]; + if (exists $bg_process{$pid}->{last}) { + foreach my $p (@{$bg_process{$pid}->{last}}) { + &$p($bg_process{$pid}); + } + } else { + Irssi::print(join(" ",@res), MSGLEVEL_CLIENTCRAP); + } + delete $bg_process{$pid}; + } +} + +sub upload { + my ($filename) = @_; + my $ua = LWP::UserAgent->new(agent=>'wget'); + my $filename = bsd_glob $filename; + if (-e $filename) { + my $re = $ua->request(POST $base_uri, + Content_Type => 'form-data', + Content => + {file=>[$filename]} + ); + my $res= $re->content; + my $code= $re->code(); + chomp $res; + return $res, $code; + } +} + +sub url { + my ($url) = @_; + my $ua = LWP::UserAgent->new(agent=>'wget'); + my $re = $ua->request(POST $base_uri, + {url=> $url} + ); + my $res= $re->content; + my $code= $re->code(); + chomp $res; + return $res, $code; +} + +sub shorten { + my ($url) = @_; + my $ua = LWP::UserAgent->new(agent=>'wget'); + my $re = $ua->request(POST $base_uri, + {shorten=> $url} + ); + my $res= $re->content; + my $code= $re->code(); + chomp $res; + return $res, $code; +} + +sub past2channel { + my ($cmd) = @_; + my $witem = $cmd->{witem}; + if (defined $witem && (int($cmd->{res}[1] / 100) == 2)) { + $witem->command("msg * $cmd->{res}[0]"); + } else { + Irssi::print($cmd->{res}[0],MSGLEVEL_CLIENTCRAP); + } +} + +sub cmd { + my ($args, $server, $witem)=@_; + my ($opt, $arg) = Irssi::command_parse_options($IRSSI{'name'}, $args); + + if (length($args) >0 ) { + my $cmd; + if (exists $opt->{p}) { + $cmd->{last}=[\&past2channel]; + $cmd->{witem}=$witem; + } + if (exists $opt->{u}) { + $cmd->{cmd}=\&url; + $cmd->{args}=[$arg]; + background( $cmd ); + } elsif (exists $opt->{s}) { + $cmd->{cmd}=\&shorten; + $cmd->{args}=[$arg]; + background( $cmd ); + } elsif (exists $opt->{c}) { + $cmd->{cmd}=\&shorten; + $cmd->{args}=['https://scripts.irssi.org/']; + $cmd->{last}=[\&self_check]; + $self_check_timer= Irssi::timeout_add_once(2000, \&self_check, ''); + background( $cmd ); + } else { + $cmd->{cmd}=\&upload; + $cmd->{args}=[$arg]; + background( $cmd ); + } + } else { + cmd_help($IRSSI{'name'}); + } +} + +sub self_check { + my ( $arg )=@_; + my $s='ok'; + my @res; + if ( ref($arg) ne 'HASH' ) { + $s = 'Error: timeout'; + } else { + @res= @{$arg->{res}}; + Irssi::timeout_remove($self_check_timer); + Irssi::print("0x0st: surl: $res[0] stat: $res[1]", MSGLEVEL_CLIENTCRAP); + if ( 2 != scalar (@res ) ) { + $s = 'Error: arg count'; + } elsif ( $res[1] != 200 ) { + $s = "Error: HTTP status code ($res[1])"; + } elsif ( $res[0] !~ m/^http/ ) { + $s = "Error: result ($res[0])"; + } + } + Irssi::print("0x0st: selfcheck $s", MSGLEVEL_CLIENTCRAP); + my $schs_version = $Irssi::Script::selfcheckhelperscript::VERSION; + Irssi::command("selfcheckhelperscript $s") if (defined $schs_version); +} + +sub cmd_help { + my ($args, $server, $witem)=@_; + $args=~ s/\s+//g; + if ($IRSSI{name} eq $args) { + Irssi::print($help, MSGLEVEL_CLIENTCRAP); + Irssi::signal_stop(); + } +} + +sub sig_setup_changed { + $base_uri= Irssi::settings_get_str($IRSSI{name}.'_base_uri'); +} + +Irssi::signal_add('setup changed', \&sig_setup_changed); +Irssi::signal_add('pidwait', \&sig_pidwait); + +Irssi::settings_add_str($IRSSI{name} ,$IRSSI{name}.'_base_uri', 'https://0x0.st/'); + +Irssi::command_bind($IRSSI{name}, \&cmd); +Irssi::command_bind('help', \&cmd_help); +Irssi::command_set_options($IRSSI{name},"p u s c"); + +sig_setup_changed(); diff --git a/scripts/8-ball.pl b/scripts/8-ball.pl new file mode 100644 index 0000000..cb8a0df --- /dev/null +++ b/scripts/8-ball.pl @@ -0,0 +1,131 @@ +#8-ball / decision ball +# +#What is this? +# +#The 8-ball (Eight-ball) is a decision ball which i bought +#in a gadget shop when i was in London. I then came up with +#the idea to make an irc-version of this one :) +#There are 16 possible answers that the ball may give you. +# +# +#usage +# +#Anyone in the same channel as the one who runs this script may +#write "8-ball: question ?" without quotes and where question is +#a question to ask the 8-ball. +#An answer is given randomly. The possible answers are the exact +#same answers that the real 8-ball gives. +# +#Write "8-ball" without quotes to have the the ball tell you +#how money questions it've got totally. +# +#Write "8-ball version" without quotes to have him tell what +#his version is. +# +# +use strict; +use warnings; +use vars qw($VERSION %IRSSI); + +use Irssi qw(command_bind signal_add); +use IO::File; +$VERSION = '0.23'; +%IRSSI = ( + authors => 'Patrik Akerfeldt', + contact => 'patrik.akerfeldt@gmail.com', + name => '8-ball', + description => 'Dont like to take decisions? Have the 8-ball do it for you instead.', + license => 'GPL', +); + +my $filename= Irssi::get_irssi_dir().'/8-ball'; + +sub own_question { + my ($server, $msg, $target) = @_; + question($server, $msg, "", $target); +} + +sub public_question { + my ($server, $msg, $nick, $address, $target) = @_; + question($server, $msg, $nick.": ", $target); +} +sub question { + my ($server, $msg, $nick, $target) = @_; + $_ = $msg; + if (!/^8-ball/i) { return 0; } + + if (/^8-ball:.+\?$/i) { + # From: "The 8-Ball Answers", http://8ball.ofb.net/answers.html + my @answers = ( + 'Signs point to yes.', + 'Yes.', + 'Reply hazy, try again.', + 'Without a doubt.', + 'My sources say no.', + 'As I see it, yes.', + 'You may rely on it.', + 'Concentrate and ask again.', + 'Outlook not so good.', + 'It is decidedly so.', + 'Better not tell you now.', + 'Very doubtful.', + 'Yes - definitely.', + 'It is certain.', + 'Cannot predict now.', + 'Most likely.', + 'Ask again later.', + 'My reply is no.', + 'Outlook good.', + 'Don\'t count on it.' + ); + + $server->command('msg '.$target.' '.$nick.'8-ball says: '.$answers[rand @answers]); + + my ($fh, $count); + $fh = new IO::File; + $count = 0; + if ($fh->open($filename, 'r')){ + $count = <$fh>; + $fh->close; + } + $count++; + $fh = new IO::File; + if ($fh->open($filename, 'w')){ + print $fh $count; + $fh->close; + }else{ + print "Couldn't open file for output. The value $count couldn't be written."; + return 1; + } + return 0; + } elsif (/^8-ball$/i) { + + my ($fh, $count); + $fh = new IO::File; + $count = 0; + if ($fh->open($filename, 'r')){ + $count = <$fh>; + $server->command('msg '.$target.' 8-ball says: I\'ve got '.$count.' questions so far.'); + $fh->close; + }else{ + print "Couldn't open file for input"; + return 1; + } + return 0; + + } elsif (/^8-ball version$/i){ + $server->command('msg '.$target.' My version is: '.$VERSION); + return 0; + } else { + if(!/^8-ball says/i){ + $server->command('msg '.$target.' '.$nick.'A question please.'); + return 0; + } + } + +} + +signal_add("message public", "public_question"); +signal_add("message own_public", "own_question"); + +# vim:set ts=8 sw=8: diff --git a/scripts/Cirssi.pl b/scripts/Cirssi.pl new file mode 100644 index 0000000..92e0b9f --- /dev/null +++ b/scripts/Cirssi.pl @@ -0,0 +1,802 @@ +use strict; +use vars qw($VERSION %IRSSI); +# Consolidate Irssi Player +# +# Copyright (C) 2009 Dani Soufi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Change Log: +# v2.2: +# - change the audacious and audtool command name +# v2.0.1b: +# - Cleaning some unusefull code. +# - Show an error when a command is executed in a wrong window, instead of exiting silently. +# v2.0.0: +# - Start/Play(Toggle)/Stop/Pause/Unpause/Next/Previous/Volume MOC Player control functions are added. +# - MOC Player support is implemented. +# v1.1.2: +# - The script is now meant to be a bit more intelligent in dealing with song tags and different user song display settings. +# - Display album name in --details if it exists. +# v1.1.0: +# - Script's name is renamed to Consolidate Irssi Player on global basis to expand it's use in the future. +# - Removed cmd_shuffle{} and cmd_repeat{} functions since they aren't supported anymore by Audacious2. +# - Added use --details flag for bitrate and frequency details in current playing song. +# - Added Jump to specific song in the playing list according to track number. +# - Added Volume control support from Irssi. +# - Updated the script to work with the newest Audacious v2 and audtool2 available. +# v1.0.4: +# - Added Repeat on/off capability +# - Added Shuffle on/off capability +# - Fixed script output handling for audacious version in case audacious isn't running +# - If encountered a problem with audacious version, try changing `audacious --version` to `audtool -v` +# v1.0.3: +# - Added Playlist functionality +# - Added Song details (Bitrate/Frequency/Length/Volume) +# - Current song notice with song details (Optional) +# v1.0.2: +# - The script now handles warning support if you got audacious not running +# - Added track number, current time elapse and total track time +# - Added Stop functionality +# v1.0.1: +# - Added ability to autonotify the channel after skipping a song (optional) +# - Added Skip/Play/Pause/Resume calls +# +# How To Use? +# Copy your script into ~/.irssi/scripts/ directory +# Load your script with /script load audacious in your Irssi Client +# Type '/audacious help' in any channel for script commands +# For autoload insert your script into ~/.irssi/scripts/autorun/ directory +# Even better would be if you placed them in ~/.irssi/scripts/ and created symlinks in autorun directory +# +use Irssi; +use IPC::Open3; + +$VERSION = '2.2'; +%IRSSI = ( + authors => "Dani Soufi (compengi)", + contact => "IRC: Freenode network, #ubuntu-lb", + name => "Consolidate Irssi Player", + description => "Controls Audacious2 and MOCP from Irssi", + license => "GNU General Public License", + url => "http://git.peersnode.net/", + changed => "2019-01-20", +); + +################################################################################# +# Please do not change anything below this, unless you know what you are doing. # +################################################################################# + +# command names of audacious and audtool +my $c_audtool="audtool"; +my $c_audacious="audacious"; + +# Give an error when a command is used where it was not supposed to, instead +# of exiting silently. Much better this way. +sub cmd_err { + print "Error: This command can't be executed in this window."; +} + +sub cmd_aud_song { + my ($data, $server, $witem) = @_; + # Get current song information. + if ($witem && ($witem->{type} eq "CHANNEL")) { + my ($position, $song, $current, $total, $artist, $album, $title, + $total, $bitrate, $frequency, $album); + + chomp($position = `$c_audtool --playlist-position`); + chomp($song = `$c_audtool --current-song`); + chomp($current = `$c_audtool --current-song-output-length`); + chomp($total = `$c_audtool --current-song-length`); + chomp($artist = `$c_audtool --current-song-tuple-data artist`); + chomp($album = `$c_audtool current-song-tuple-data album`); + chomp($title = `$c_audtool --current-song-tuple-data title`); + chomp($total = `$c_audtool --current-song-length`); + chomp($bitrate = `$c_audtool --current-song-bitrate-kbps`); + chomp($frequency = `$c_audtool --current-song-frequency-khz`); + chomp($album = `$c_audtool current-song-tuple-data album`); + + + # Read output. + my ( $wtr, $rdr, $err ); + my $pid = open3( $wtr, $rdr, $err, + $c_audtool, '--current-song-tuple-data', 'file-name') or die $!; + + # Make it global. + my $file; + { + local $/; + $file = <$rdr>; + $file =~ s/\.(?i:mp3|cda|aa3|ac3|aif|ape|med|mpu|wave|mpc|oga|wma|ogg|wav|aac|flac)\n//; + } + + if (`ps -C $c_audacious` =~ /audacious/) { + if ($data ne "--details") { + + # If we notice that the user sorted his playlist + # by song title, we will try to be nice and parse + # the existing artist for him. + if ($song !~ /$artist/) { + # If $song is different from $album, + # we add the artist to output line. + # Else strip the album from $song. + if ($song !~ /$album/) { + # If we have no song tags, $song will be set to the file's name. + # In this case, we drop the file's extension know to us and print it. + if ($song =~ /$file/) { + $witem->command("/me is listening to: $file ($current/$total)"); + } + else { + $witem->command("/me is listening to: $artist - $song ($current/$total)"); + } + } + else { + $song =~ s/$album - //im; + $witem->command("/me is listening to: $artist - $song ($current/$total)"); + } + } + else { + $witem->command("/me is listening to: $artist - $title ($current/$total)"); + } + } + # Show more details in our output. + if ($data eq "--details") { + + # Check against an empty string. + # If it's empty, we don't print it. + if ($album ne "") { + # Make sure $song doesn't match $artist. + # Else we print the $song as it is. + if ($song !~ /$artist/) { + # If $song is different from $album, + # we add the artist to output line. + # Else strip the album from $song. + if ($song !~ /$album/) { + if ($song =~ /$file/) { + $witem->command("/me is listening to: $artist - $song from $album ($current/$total) [$bitrate Kbps/$frequency KHz]"); + } + } + else { + $witem->command("/me is listening to: $artist - $title from $album ($current/$total) [$bitrate Kbps/$frequency KHz]"); + } + } + elsif ($song =~ /\[ $album \]/) { + $witem->command("/me is listening to: $artist - $title from $album ($current/$total) [$bitrate Kbps/$frequency KHz]"); + } + else { + $song =~ s/$album - //im; + $witem->command("/me is listening to: $song from $album ($current/$total) [$bitrate Kbps/$frequency KHz]"); + } + } + elsif ($song =~ /$file/) { + $witem->command("/me is listening to: $file ($current/$total) [$bitrate Kbps/$frequency KHz]"); + } + else { + $witem->command("/me is listening to: $artist - $title ($current/$total) [$bitrate Kbps/$frequency KHz]"); + } + } + } + else { + $witem->print("Audacious is not currently running."); + } + return 1; + } + else { + cmd_err(); + } +} + +sub cmd_aud_next { + my ($data, $server, $witem) = @_; + # Skip to the next track. + if ($witem && ($witem->{type} eq "CHANNEL")) { + if (`ps -C audacious` =~ /audacious/) { + my $next = `$c_audtool --playlist-advance`; + + $witem->print("Skipped to next track."); + } + else { + $witem->print("Can't skip to next track. Check your Audacious."); + } + return 1; + } + else { + cmd_err(); + } +} + +sub cmd_aud_previous { + my ($data, $server, $witem) = @_; + # Skip to the previous track. + if ($witem && ($witem->{type} eq "CHANNEL")) { + if (`ps -C $c_audacious` =~ /audacious/) { + my $reverse = `$c_audtool --playlist-reverse`; + + $witem->print("Skipped to previous track."); + } + else { + $witem->print("Can't skip to next track. Check your Audacious."); + } + return 1; + } + else { + cmd_err(); + } +} + +sub cmd_aud_play { + my ($data, $server, $witem) = @_; + # Start playback. + if ($witem && ($witem->{type} eq "CHANNEL")) { + if (`ps -C $c_audacious` =~ /audacious/) { + my $play = `$c_audtool --playback-play`; + + $witem->print("Started playback."); + } + else { + $witem->print("Playback can't be performed now."); + } + return 1; + } + else { + cmd_err(); + } +} + +sub cmd_aud_pause { + my ($data, $server, $witem) = @_; + # Pause playback. + if ($witem && ($witem->{type} eq "CHANNEL")) { + if (`ps -C $c_audacious` =~ /audacious/) { + my $pause = `$c_audtool --playback-pause`; + + $witem->print("Paused playback."); + } + else { + $witem->print("Pause can be only performed when Audacious is running."); + } + return 1; + } + else { + cmd_err(); + } +} + +sub cmd_aud_stop { + my ($data, $server, $witem) = @_; + # Pause playback. + if ($witem && ($witem->{type} eq "CHANNEL")) { + if (`ps -C $c_audacious` =~ /audacious/) { + my $stop = `$c_audtool --playback-stop`; + + $witem->print("Stopped playback."); + } + else { + $witem->print("This way you can't start Audacious."); + } + return 1; + } + else { + cmd_err(); + } +} + +sub cmd_aud_volume { + my ($data, $server, $witem) = @_; + # Set volume and make sure the value is an integer + # that lays between 0 and 100. + if ($witem && ($witem->{type} eq "CHANNEL")) { + if (`ps -C $c_audacious` =~ /audacious/) { + + if ($data eq "") { + $witem->print("Use /audacious volume to set a specific volume value"); + } + elsif ($data < 0 or $data > 100) { + $witem->print("Given value is out of range [0-100]."); + return 0; + } + elsif ($data =~ /^[\d]+$/) { + system $c_audtool,'--set-volume', $data; + my $volume = `$c_audtool --get-volume`; + chomp($volume); + $witem->print("Volume is changed to $volume%%"); + } + else { + $witem->print("Please use a value [0-100] instead."); + } + } + else { + $witem->print("Volume can't be set in the current state."); + } + return 1; + } + else { + cmd_err(); + } +} + +sub cmd_aud_jump { + my ($data, $server, $witem) = @_; + # Jump to a specific track, making sure that + # the selected track number exists. + if ($witem && ($witem->{type} eq "CHANNEL")) { + if (`ps -C $c_audacious` =~ /audacious/) { + + if ($data eq "") { + $witem->print("Use /audacious jump number to jump to it in your playlist."); + } + elsif ($data =~ /^[\d]+$/) { + # Many thanks to Khisanth for this awesome fix! + my ( $wtr, $rdr, $err ); + my $pid = open3( $wtr, $rdr, $err, + $c_audtool, '--playlist-jump', $data) or die $!; + my $output; + { + local $/; + $output = <$rdr>; + } + if ($output =~ /invalid/) { + $witem->print("Track #$data isn't found in your playlist."); + } + else { + $witem->print("Jumped to track #$data."); + } + } + else { + $witem->print("Please use a valid integer."); + } + } + else { + $witem->print("Start your audacious first."); + } + return 1; + } + else { + cmd_err(); + } +} + +sub cmd_aud_playlist { + my ($data, $server, $witem) = @_; + # Displays entire playlist loaded. + if (`ps -C $c_audacious` =~ /audacious/) { + my $display = `$c_audtool --playlist-display`; + chomp($display); + + Irssi::print("$display"); + } + else { + $witem->print("Start your player first."); + } + return 1; +} + +sub cmd_aud_search { + my ($data, $server, $witem) = @_; + + if ($witem && ($witem->{type} eq "CHANNEL")) { + if (`ps -C $c_audacious` =~ /audacious/) { + my $playlist = `$c_audtool --playlist-display`; + my @matches; + + for (split /\n/, $playlist) { + push @matches, $_ if /$data/i; + } + if (@matches) { + $witem->print("Search Results:"); + for (@matches) { + $_ =~ s/^\s+|\s+$//g; + $witem->print("$_"); + } + } + else { + $witem->print("Couldn't find any match(s) for your keyword '$data'."); + } + } + else { + $witem->print("Audacious is not running."); + } + } + else { + cmd_err(); + } +} + + +sub cmd_aud_details { + my ($data, $server, $witem) = @_; + + # Displays current song's details. + if ($witem && ($witem->{type} eq "CHANNEL")) { + if (`ps -C $c_audacious` =~ /audacious/) { + my ($bitrate, $frequency, $length, $volume); + + chomp($bitrate = `$c_audtool --current-song-bitrate-kbps`); + chomp($frequency = `$c_audtool --current-song-frequency-khz`); + chomp($length = `$c_audtool --current-song-length`); + chomp($volume = `$c_audtool --get-volume`); + + $witem->print("Current song details: rate: $bitrate kbps - freq: $frequency KHz - l: $length min - vol: $volume%%"); + } + else { + $witem->print("Your player doesn't seem to be running"); + } + return 1; + } + else { + cmd_err(); + } +} + +sub cmd_aud_version { + my ($data, $server, $witem) = @_; + + my ($audtool, $audacious); + chop($audtool = `$c_audtool --version`); + chop($audacious = `$c_audacious --version`); + + # Displays version information to the channel. + if ($witem && ($witem->{type} eq "CHANNEL")) { + + if ($data eq "--audtool") { + $witem->command("/me is running: Consolidate Irssi Player v$VERSION with $audtool"); + } + elsif ($data eq "--audacious") { + $witem->command("/me is running: Consolidate Irssi Player v$VERSION with $audacious"); + } + return 1; + } + else { + Irssi::print("Consolidate Irssi Player v$VERSION on $audacious with $audtool"); + } +} + +sub cmd_audacious { + my ($data, $server, $witem) = @_; + if ($data =~ m/^[(song)|(next)|(previous)|(play)|(pause)|(stop)|(help)|(volume)|(jump)|(playlist)|(details)|(about)|(search)]/i) { + Irssi::command_runsub('audacious', $data, $server, $witem); + } + else { + Irssi::print("Use /audacious