All Activity
- Last week
-
Soju is an IRC bouncer and gamja is a web client that works nicely with it. This article describes how to make them work with Caddy web server. The file paths mentioned may vary depending on the operating system or Linux distribution used. I set this up using the current stable soju release (0.5.2) provided by Arch Linux. Install gamja into your web server path: git clone https://git.sr.ht/~emersion/gamja cd gamja npm install --production You can optionally add a config.json file in the gamja directory to define various settings. Note that you have to remove the comments from the example provided in the gamja site as they are not valid JSON. For this particular setup, there is no need to define a “url” option as the default “/socket” will be used. In your DNS records, define a subdomain. Example configuration block for Caddy: irc.blabla.com { encode gzip tls my@email.com root * /var/www/gamja reverse_proxy /socket http://127.0.0.1:1234 file_server } Replace the port as you want. You might want to add basicauth for access control. /etc/soju/config has by default db sqlite3 /var/lib/soju/main.db message-store fs /var/lib/soju/logs/ Run sojuctl to create an admin user: sudo sojuctl -config /etc/soju/config create-user username -admin This will modify /var/lib/soju/main.db, adding the new admin user. Save the password as it will be used when logging in via gamja. In the next release, the admin user creation will be done with the sojudb command instead. The systemd service file provided by the Arch Linux package did not work for me, so I adapted Damjan Georgievski’s example service, resulting in a /etc/systemd/system/soju.service that looked like this: [Unit] Description=soju IRC bouncer service After=network-online.target [Service] Type=simple DynamicUser=yes StateDirectory=soju LogsDirectory=soju ConfigurationDirectory=soju RuntimeDirectory=soju Restart=always ExecStart=/usr/bin/soju --config /etc/soju/config -listen ws+insecure://127.0.0.1:1234 ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target Enable and start the service with sudo systemctl enable --now soju Now you can navigate to your subdomain with a web browser and log into gamja with the admin user name and password. In the gamja interface, click “bouncer” in the top left to attach to the bouncer. Click “Add network” in the top right to add an IRC network. You can say /msg BouncerServ help to see all the commands you can use to interact with the bouncer. The commands are also documented in soju’s manual. Regarding the first steps, note what the soju manual says in the description: When joining a channel, the channel will be saved and automatically joined on the next connection. When registering or authenticating with NickServ, the credentials will be saved and automatically used on the next connection if the server supports SASL. To conveniently access the log text files with my normal user, I use bindfs and FUSE. I avoid having to mess around with permissions by adding a line like this to /etc/fstab: /var/lib/soju/logs /home/myuser/sojulogs fuse.bindfs force-user=myuser,force-group=myuser,create-for-user=soju,create-for-group=soju,create-with-perms=g=rD,chgrp-ignore,chown-ignore,chmod-ignore 0 0 and creating the corresponding directory to bind to and mounting it with sudo mount /home/myuser/sojulogs. If you are interested in trying this out, you can start by checking the distro availability of bindfs from Repology. Thanks to everyone who helped me on #soju at Libera Chat and Caddy server forum! Made with Hugo ʕ•ᴥ•ʔ Bear
-
- Earlier
-
truck findr joined the community
-
Been using RafaeLLa IRC Bot Services on our irc server and love it. the features and commands are great the only thing that did not function was the weather which I know is due to Wunderground always changing api keys. But other then that this is a must for any admin server has a lot to offer!! Westor has done a great job on this server bot and i see he continues to upgrade so hats off to Westor!! 👍 westor (aka ^WeSt) Website - Home page (ucoz.com)
-
jaffreyzara3 joined the community
-
jamiaquran changed their profile photo
-
jamiaquran joined the community
-
We at Relay-Radio would like to thank all the people that came out to donate & have fun with our radiothon. At the same time we like to thanks all the dj's for there massive time and great shows they put on for all of us. Thanks to all 😀
-
Join the DJ's of Relay-Radio today @ 5:30pm EST for their first Relay Radiothon. Starting with DJ Mario! Lets support the dj's and have a great time!!! Join in the fun & make your song requests & have a blast. Many rooms support Relay-Radio from openminded to Coder-irc-lounge or just join Relay-Radio room. Lets show our support for the greatest radio station on Buzzen 😎
-
So i went browsing after finding out there was issues with Nerds pylink and they havent been back up, saw this site IRC4FUN and what they got was also pylink and I find it a great system. So lets see what happens in the near future!! IRC4Fun – Internet Relay Chat
-
priyamahajan62 joined the community
-
-
-
Version 1.0.0
0 downloads
Zurna mirc script her insanın hayalindeki bayan veya erkek arkadaşla tanışmak için girdikleri bu sohbet sunucularını biz hayal olmaktan çıkardık ve sizlere bu imkanı ücretsiz olacak bir şekilde sunarak 7/24 online sohbet ve destek ile hizmet vermekteyiz. Sizleri daha kaliteli bir sohbet odalarına girmesini sağlayarak Zurna mIRC sayesinde bir çok insanla tanışmasını sağlıyoruz. Yetişkin insanların bulunduğu bu siteleri nasıl kullana bilirsiniz, mirc girişi var mı gibi sorulara çok kolay ve hemen cevap bulacağınız bilgilendirme yazıları yazmaya devam ediyoruz. Zurna mirc kullanıcısı olduğunuz da bir çok insanı kaliteli sohbet ile etkileye bilirsiniz. -
Version 1.0.0
0 downloads
Merhaba arkadaşlar; sizlere bugün Soyle Script hakkında bilgi anlatacağız; Neden bu anlatımı yapacağımız dan başlayalım. Kullanımında içinde yaptığınız sohbetin farkını görmenizi sağlayacak açıklamalarda bulunacağız sizlere bir çok insanın beklediği ama uzun zamandan beri peşinden koştuğu açıklamalarda bulunacağım. Bir çok kişinin merakla beklediği artık sizlerle buluşmaya başlıyor ücretsiz olarak yayınladığımız ile sohbet odalarımızın içinde yetişkin insanlarla tanışa biliyorsunuz. Bugün bu hizmeti size vere bilen siteleri toplasanız parmakla gösterilecek ve sayılmayacak kadar azdır. Bizler sizlerin daha güzel bir şekilde konuşup, sohbet etmesini istediğimiz içinde kendimizi sürekli olarak güncelleştiriyoruz. Bunu yaparken de bir çok insanın başaramayacağı işleri biz soyle Script olarak sohbet odalarımızın içinde bunları ücretsiz bir şekilde sizlerin beğenisine sunuyoruz. Soyle miRC Script ile bu farkı yaşamak istiyorsanız yapmanız gereken şey ise çok basit arkadaşlar ne yapacaksınız biliyor musunuz? Elbete bilmiyorsunuz bugün sizlere sunulan bu hizmete karşılık veren sohbet sunucuları içinde bizlerin farkını yaşamak istiyorsanız, sizde hemen Soyle Script indirerek sohbet.net sunucusuna bağlanarak Sohbet etmeye başlıyorsunuz. -
Kullanımı Sadece oplara göndermek için : / Mesaj #kanal op mesajınız Sadece normal kullanıcılara göndermek için : /mesaj #kanal user mesajınız. Kanaldaki tüm kullanıcılara göndermek için : /mesaj #kanal tümü mesajınız . alias mesaj { var %k = $1,%m = $3-,%p if ($2 = user) { set %p r } if ($2 = op) { set %p o } if ($2 = tümü) { set %p a } var %i 1 while (%i <= $nick($1,0,%p)) { .msg $nick($1,%i,%p) %m inc %i } }
-
Benzer aktivite kullami vardır Duration ve identifiers ile. Aşağıda paylaşım yaptığım parametre seçenek ile birlikte gün saat ve dakika olarak ayrı ayrı alabilirsiniz . Kullanımı : $dur(saniye) Properties : days, hours, minutes Örnek : ” //echo -a $dur(1258745) ” komutunu uyguladığınızda “ 1258745 ” saniyenin ” 14 days, 13:39 ” zaman birimine eşit olduğunu görürüz. Buda 14 gün 13 saat ve 39 dakika olduğunu söyler. Örnek : ” //echo -a $dur(1258745).hours ” komutunu uyguladığınızda ” 13 ” verisini alırız. Burada gün ve dakika harici sadece saatin gösterilmesini sağlamış olursunuz. ALIAS dur { var %uptime.days = 0, %uptime.time if ($regex($duration($1),/(\d+)wk/)) { %uptime.days = $calc($regml(1) * 7) } if ($regex($duration($1),/(\d+)day/)) { inc %uptime.days $regml(1) } var %uptime.dummy1 = $regex(hr,$duration($1),/(\d+)hr/), %uptime.dummy2 = $regex(min,$duration($1),/(\d+)min/) %uptime.time = $+($iif($regml(hr,0),$iif($len($regml(hr,1)) == 1,$+(0,$regml(hr,1)),$regml(hr,1)),00),:,$iif($regml(min,0),$iif($len($regml(min,1)) == 1,$+(0,$regml(min,1)),$regml(min,1)),00)) if ($prop == days) return %uptime.days if ($prop == hours) return $gettok(%uptime.time,1,58) if ($prop == minutes) return $gettok(%uptime.time,2,58) else { return %uptime.days $+(day,$iif(%uptime.days > 1,s),$chr(44)) %uptime.time } }
-
Selam arkadaşlar ; Sunucarimizda ne kadar da /Motd (message of the day) 'da yasaklı olduğunu belirtsek de giriş yapan kullanıcılar için pek bir fayda etmemektedir. Örneğin : ahmet16 veya ayse17 gibi nicklerin giriş yapması kaçınılmaz bir durumdadır . Bu tarz nicklerin sunucuya giriş yaptığında otomatik olarak atılmasına yarayacak bir kodu sizlere sunmak istedim . Bu işlemler aktif olduğunda @Dikkat penceresine ya sayacaktir. İsteğe göre zline yerine $nick seçebilirsiniz. on *:join:#cinsellik: { if $len($regsubex($nick,/\D+/g,\1) == 2) && $regex($regsubex($nick,/\D+/g,\1),/^(12|13|14|15|16|17)$/i) && !$regex($regsubex($remove($nick,_,-,],[,^,|,`),/\d/g,\1),/(cm|sant[iİı]m|ya[sŞş]|sntm|snt|sntm|cantim)/i) && !$regex($regsubex($remove($nick,_,-,],[,^,|,`),/\D/g,\1),/(1[234567]cm|1[234567]ya[Şş]|1[234567]santim|1[234567]santm|cm1[234567]|santim1[234567])/i) { zline $nick - 18_Yaş_Giriş_Yasaktır. $iif(!$window(@dikkat),window -en @dikkat) echo 2 @dikkat $timestamp $nick nicki atıldı. | echo @dikkat - } }
-
on ^&*:JOIN:#:{ if ($chan = #KANAL) { if (*Network* !iswm $remove($gettok($address($nick,0),1,64),*,!)) { if (*Services* !iswm $remove($gettok($address($nick,0),1,64),*,!)) { if (*IRc* !iswm $remove($gettok($address($nick,0),1,64),*,!)) { if (*opers* !iswm $remove($gettok($address($nick,0),1,64),*,!)) { echo -a 9,1-Bildirim-Bildirim-Bildirim- $nick $+ , 4#KanaL8 Kanala giriş yaptı ilgilenirmisiniz? } } } } } Genellikle #operhelp ve #help kanalları için kullanılır. İşleme göre kendinize ayarlayabilirsiniz .
-
on *:snotice:*: { if (*client conn* iswm $1-) { var %i = $gettok($remove($10,$chr(40)),1,64) if ($hget(ident,%i) >= 6) kill $9 KILL SEBEBİ. else hinc -m ident %i 1 } if (*client exiting* iswm $1-) { var %ii = $gettok($remove($7,$chr(40)),1,64) $iif($hget(ident,%ii) >= 1,hdec ident %ii 1) } } Sunucu üzerindeki belirlediğiniz bir İdent'i İstediğiniz Limit kadar kullanılmasına izin verir. Ama limit aşılırsa otomatik olarak Kill atar . Giriş cıkısları otomatik olarak kontrol eder ve girdi(inc)/çıktı(dec) şeklinde tutar.
-
on *:snotice:*: { if (*client conn* iswm $1-) { var %i = $gettok($remove($10,$chr(40)),1,64) if ($hget(ident,%i) >= 6) kill $9 KILL SEBEBİ. else hinc -m ident %i 1 } if (*client exiting* iswm $1-) { var %ii = $gettok($remove($7,$chr(40)),1,64) $iif($hget(ident,%ii) >= 1,hdec ident %ii 1) } } Sunucu üzerindeki belirlediğiniz bir İdent'i İstediğiniz Limit kadar kullanılmasına izin verir. Ama limit aşılırsa otomatik olarak Kill atar . Giriş cıkısları otomatik olarak kontrol eder ve girdi(inc)/çıktı(dec) şeklinde tutar.
-
n @*:text:*:#:{ var %s = 1,%ss = $lines(reklam.txt) while %s <= %ss { if $+(*,$read(reklam.txt,%s),*) iswm $1- { var %o = $remove($v1,*),%p = $regsub(%o,/(a|e|i|u|ü|o|ö|[A-Z])/gi,$chr(42)\1,%o) ban -k # $nick 2 Yasaklı kelime kullandınız: %o } inc %s } } Kullanımı : Reklam.txt içerisindeki kelimeler üzerinde işlev yapar. Diğer bir kullanım ise alias ok { var %1 = $1- var %2 = $regsub(%1,/(a|e|i|u|ü|o|ö|ı)/gi,$chr(42)\1,%1) return %1 } Örneğin; //echo -: $ok(Bilirmisin?) yaptığında;B*l*r*m*s*n? şeklinde olucak,tır : )
-
#otokomut on on *:input:*: { if ($1 == !kick) { /kick # $2 4 $me İyi Yolculuklar Diler. } if ($1 == !ban) { /ban -u600 $2 } if ($1 == !kb) { /ban -u600 $2 | /kick # $2 4 $me İyi Yolculuklar Diler. } if ($1 == !gel) { /msg # 2 $2 4Getiriliyor... | /sajoin $2 # } if ($1 == !git) { /msg # 2 $2 4Gönderiliyor... | /sapart $2 # } if ($1 == !cs) { /Chanserv $2 # $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 $32 $33 $34 $35 $36 $37 $38 $39 $40 $41 $42 $43 $44 $45 $46 $47 $48 $49 $50 $51 $52 $53 $54 $55 $56 $57 $58 $59 $60 } if ($1 == !ms) { /Memoserv $2 $3 $4 $5 $6 $7 $8 $9 } if ($1 == !os) { /Operserv $2 $3 $4 $5 $6 $7 $8 $9 } if ($1 == !ns) { /Nickserv $2 $3 $4 $5 $6 $7 $8 $9 } if ($1 == !info) { /ns info $2 all } if ($1 == !infochan) { /cs info # all } if ($1 == !founder) { /cs set # founder $2 } if ($1 == !mlock) { /cs set # mlock $2 } if ($1 == !privateon) { /cs set # private on } if ($1 == !privateoff) { /cs set # private off } if ($1 == !secureon) { /cs set # secure on } if ($1 == !secureoff) { /cs set # secure off } if ($1 == !enforceon) { /cs set # enforce on } if ($1 == !enforceoff) { /cs set # enforce off } if ($1 == !topic) { /cs topic # $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 $32 $33 $34 $35 $36 $37 $38 $39 $40 $41 $42 $43 $44 $45 $46 $47 $48 $49 $50 $51 $52 $53 $54 $55 $56 $57 $58 $59 $60 } if ($1 == !successor) { /cs set # successor $2 } if ($1 == !unban) { /cs unban #$2 } if ($1 == !opekle) { /cs access # add $2 50 } if ($1 == !opsil) { /cs access # del $2 } if ($1 == !sopekle) { /cs access # add $2 100 } if ($1 == !oplist) { /cs access # list } if ($1 == !hopekle) { /cs access # add $2 40 } if ($1 == !gir) { /join #$2 } if ($1 == !voice) { /cs voice # $2 } if ($1 == !devoice) { /cs devoice # $2 } if ($1 == !op) { /cs op # $2 } if ($1 == !deop) { /cs deop # $2 } if ($1 == !ownerim) { /mode # +q $me } if ($1 == !deownerim) { /mode # -q $me } if ($1 == !owner) { /mode # +q $2 } if ($1 == !deowner) { /mode # -q $2 } if ($1 == !sop) { /Os raw :Chanserv mode # +o $2 | /Os raw :Chanserv mode # +a $2 } if ($1 == !desop) { /Os raw :Chanserv mode # -o $2 | /Os raw :Chanserv mode # -a $2 } if ($1 == !hop) { /cs halfop # $2 } if ($1 == !dehop) { /cs dehalfop # $2 } if ($1 == !awayon) { /away Uzaklardayım... } if ($1 == !awayoff) { /away } if ($1 == !kill) { /kill $2 4 $me İyi Yolculuklar Diler. } if ($1 == !zline) { /zline $2 4 $me İyi Yolculuklar Diler. } if ($1 == !shun) { /shun $2 4 $me Sana 3 Maymunu Oynatıyor. } if ($1 == !bye) { /kill $2 4 $me İyi Yolculuklar Diler. } if ($1 == !opum) { /mode # +o $me } if ($1 == !deopum) { /mode # -o $me } if ($1 == !voicem) { /mode # +v $me } if ($1 == !devoicem) { /mode # -v $me } if ($1 == !sopum) { /mode # +o $me | /mode # +a $me } if ($1 == !desopum) { /mode # -a $me | /mode # -o $me } if ($1 == !hopum) { /mode # +h $me } if ($1 == !dehopum) { /mode # -h $me } if ($1 == !nick) { /os raw svsnick $2 $3 1:0 } if ($1 == !botnick) { /os raw $2 nick $3 } if ($1 == !botgel) { /os raw $2 join # } if ($1 == !botgit) { /os raw $2 part # } if ($1 == !botde) { /os raw $2 privmsg # $3 $4 $5 $6 $7 $8 $9 } if ($1 == !sessiz) { /mode # +m } if ($1 == !mode) { /mode # $2 } if ($1 == !sesli) { /mode # -m } if ($1 == !sakin) { /mode # +m | /msg # !temizle | .timer34 1 60 /mode # -m } } #otokomut end menu menubar,channel { Oto Komutlar .Aç:.enable #otokomut | echo -a 4,1..::Oto Komutlar Açıldı::.. .Kapat:.disable #otokomut | echo -a 4,1..::Oto Komutlar Kapandı:.. - }
-
on *:TEXT:!bansil:#?:{ var %ban 1 While ( %ban <= $ibl($chan,0) ) { mode $chan -b $ibl($chan,%ban) inc %ban } Kullanımı : !bansil Kısa yoldan banları temizleyebilrisiniz.
-
on *:text:*:#KANAL: { if ($1 == !duyuru) { if !$hget(duyuru,$nick) { .hadd -msu120 duyuru $nick 1 msg #Kanal MESAJINIZ msg #Kanal MESAJINIZ return } else { .notice $nick 2 dk içerisinde bir defa duyuru komutunu kullanabilirsiniz . } } } Belirlediğiniz kanal içerinse 2 dk bir kullanabileceginiz bir remote'dir. Süre dilediğiniz kadar çoğaltabilirsiniz . Kullanımı : !duyuru
-
IRC sunucusunda eklenen, silinen ve düzenlenen spamları bir pencerede takip etmenize yarayan kod. on *:dialog:spam:*:*: { if $devent == sclick { if $did == 35 { set %tspamsil on | spamfilter } if $did(4).state == 1 { set %yaptirim zline } if $did(3).state == 1 { set %yaptirim gline } if $did(9).state == 1 { set %yaptirim kline } if $did(5).state == 1 { set %yaptirim gzline } if $did(1).state == 1 { set %yaptirim shun } if $did(7).state == 1 { set %yaptirim tempshun } if $did(6).state == 1 { set %yaptirim block } if $did(2).state == 1 { set %yaptirim dccblock } if $did(8).state == 1 { set %yaptirim kill } if $did(12).state == 1 { set %yaptirim1 c } else { unset %yaptirim1 } if $did(17).state == 1 { set %yaptirim2 N } else { unset %yaptirim2 } if $did(20).state == 1 { set %yaptirim3 q } else { unset %yaptirim3 } if $did(13).state == 1 { set %yaptirim4 p } else { unset %yaptirim4 } if $did(15).state == 1 { set %yaptirim5 n } else { unset %yaptirim5 } if $did(18).state == 1 { set %yaptirim6 p } else { unset %yaptirim6 } if $did(14).state == 1 { set %yaptirim7 t } else { unset %yaptirim7 } if $did(19).state == 1 { set %yaptirim8 a } else { unset %yaptirim8 } if $did(16).state == 1 { set %yaptirim9 d } else { unset %yaptirim9 } if $did(23) != $null { set %ssure $did(23) } if $did(25) != $null { set %ssebep $did(25) } if $did(28) != $null { set %skelime $did(28) } if $did == 34 { /spamfilter } if $did == 33 { /spamfilter del $$?”Parametreyi Yazınız. Yani Neleri Yasakladıgınızı Özel Msg Kanal Msg Quit,Topic Vb.” $$?”Ceza Türünü Yazınız Zline,Gline Vb.” – – $$?”Cezai Kelimeyi(Sileceğiniz Kelimeyi) Yazınız” } if $did == 32 { spamfilter add %yaptirim1 $+ %yaptirim2 $+ %yaptirim3 $+ %yaptirim4 $+ %yaptirim5 $+ %yaptirim6 $+ %yaptirim7 $+ %yaptirim8 $+ %yaptirim9 %yaptirim $did(23) $+ d $did(25) $did(28) } if $did == 35 { set %tspamsil on | spamfilter } } if $devent == init { if %yaptirim == zline { did -c $dname 4 } if %yaptirim == gline { did -c $dname 3 } if %yaptirim == kline { did -c $dname 9 } if %yaptirim == gzline { did -c $dname 5 } if %yaptirim == shun { did -c $dname 1 } if %yaptirim == tempshun { did -c $dname 7 } if %yaptirim == block { did -c $dname 6 } if %yaptirim == dccblock { did -c $dname 2 } if %yaptirim == kill { did -c $dname 8 } did -a $dname 23 %ssure did -a $dname 25 %ssebep did -a $dname 28 %skelime } if $devent == close { unset %yaptirim* } } raw 229:*: { if %tspamsil == on { /spamfilter del $3 $4 $7 $8 $10- .timerufuk2 1 2 unset %tspamsil .timerufuk 1 2 echo -as 4Tüm Spamlar Silindi. Eğer Silinmeyen Varsa Unrealircd.Conf’tan Kaldırmalısınız. } $iif(!$window(@SpamFiLter),window -nC @SpamFiLter) { echo -e @SpamFilter 12Atılan Parametreler:4 $qt($3) 12Ceza Türü:4 $qt($4) 12Atılma Süresi:4 $qt($6) 12Atılma Sebebi:4 $qt($8) 12Atılan Kelime:4 $qt($remove($10,:)) 12Atan Nick:4 $qt($gettok($9,1,33)) $qt(10SPAMI SİL) haltdef } } on ^*:snotice:*: { if $2 == removed && $3 == spamfilter { $iif(!$window(@biLgi),window -nC @biLgi) { echo -et @biLgi 7»º» 10[Spamfilter] 1Hareket: 12[KALDIRMA] 1Kaldıran Nick:4 $gettok($1,1,33) 1Kaldırılan Kelime:4 $remove($4,’) | halt } } if $2 == Spamfilter && $3 == added: { $iif(!$window(@biLgi),window -nC @biLgi) { echo -et @biLgi 7»º» 10[Spamfilter] 1Hareket: 12[Aktif Etme] 1Atan Nick:4 $gettok($19,1,33) 1Atılan Parametreler: 4 $remove($6,]) 1 1Atılma Sebebi:4 $remove($10,]) 1Atılan Kelime:4 $remove($4,’) | halt } } if $1 == [Spamfilter] && $3 == matches && $4 == filter { $iif(!$window(@biLgi),window -nC @biLgi) { echo -et @biLgi 7»º» 10[SPAMFİLTER TAKILMA] 12Takılan Nick:4 $gettok($2,1,33) 12Takılan İp:4 $gettok($2,2,64) 3Spamdaki Ekli Kelime:4 $remove($5,:,’) 7Userin Yazdığı Kelime:4 $remove($8-,’,]) | halt } } }
-
chain changed their profile photo
-
priyamahipalpur1 joined the community
-
Version 1.0.0
0 downloads
This is an IRC logger with a webinterface. To install, create a new MySQL table using the provided 'mysql.sql' script and edit the 'irclog.config.php' to match your database and IRC channel settings. Then run the 'irclog.pl -s' script to start logging. The logger needs the following perl modules: POE::Component::IRC Digest::MD5 DBI::mysql -
-
Version 1.0.0
0 downloads
irc-rss-feed-bot irc-rss-feed-bot is a dockerized Python 3.11 and IRC based RSS/Atom and scraped HTML/JSON/CSV feed posting bot. It essentially posts the entries of feeds in IRC channels, one entry per message. More specifically, it posts the titles and shortened URLs of entries. Contents Features Links Examples Development Usage Configuration: secret Configuration: non-secret Global settings Mandatory Recommended Developer Feed-specific settings Mandatory Optional Parser Conditional Feed default settings Commands Administrative Deployment Maintenance Service Config Database Disk cache Features Multiple channels on an IRC server are supported, with each channel having its own set of feeds. For use with multiple servers, a separate instance of the bot process can be run for each server. Entries are posted only if the channel has not had any conversation for a certain minimum amount of time, thereby avoiding the interruption of any preexisting conversations. This amount of time is 15 minutes for any feed which has a polling period greater than 12 minutes. There is however no delay for any feed which has a polling period less than or equal to 12 minutes as such a feed is considered urgent. A SQLite database file records hashes of the entries that have been posted, thereby preventing them from being reposted. Posted URLs are shortened using the da.gd service. The hext, jmespath, and pandas DSLs are supported for flexibly parsing arbitrary HTML, JSON, and CSV content respectively. These parsers also support configurable recursive crawling. Entry titles are formatted for neatness. Any HTML tags and excessive whitespace are stripped, all-caps are replaced, and excessively long titles are sanely truncated. A TTL and ETag based compressed disk cache of URL content is used for preventing unnecessary URL reads. Any websites with a mismatched strong ETag are probabilistically detected, and this caching is then disabled for them for the duration of the process. Note that this detection is skipped for a weak ETag. Encoded Google News and FeedBurner URLs are decoded. For several more features, see the customizable global and feed-specific settings, and commands. Links Caption Link Repo https://github.com/impredicative/irc-rss-feed-bot Changelog https://github.com/impredicative/irc-rss-feed-bot/releases Image https://hub.docker.com/r/ascensive/irc-rss-feed-bot Examples <FeedBot> [ArXiv:cs.AI] Concurrent Meta Reinforcement Learning → https://arxiv.org/abs/1903.02710v1 <FeedBot> [ArXiv:cs.AI] Attack Graph Obfuscation → https://arxiv.org/abs/1903.02601v1 <FeedBot> [InfoWorld] What is a devops engineer? And how do you become one? → https://da.gd/dvXh9 <FeedBot> [InfoWorld] What is Jupyter Notebook? Data analysis made easier → https://da.gd/yrCi <FeedBot> [AWS:OpenData] COVID-19 Open Research Dataset (CORD-19): Full-text and metadata dataset of COVID-19 research articles. → https://registry.opendata.aws/cord-19 Development For software development purposes only, the project can be set up on Ubuntu as below. make setup-ppa make install-py make setup-venv make shell make install make test make build Usage Configuration: secret Prepare a private secrets.env environment file using the sample below. IRC_PASSWORD=YourActualPassword GITHUB_TOKEN=c81a62ca23caa140715bbfc175997c02d0fdd768 GITHUB_TOKEN This is optional. Refer to the publish.github feature. Configuration: non-secret Prepare a version-controlled config.yaml file using the sample below. A full-fledged real-world example is also available. host: irc.libera.chat ssl_port: 6697 #ssl_verify: true nick: MyFeedBot admin: mynick!myident@myhost alerts_channel: '#mybot-alerts' mode: #mirror: '#mybot-mirror' #publish: # github: MyGithubServiceAccountUsername/IrcServerName-MyBotName-live #defaults: # new: all feeds: "##mybot-alerts": irc-rss-feed-bot: url: https://github.com/impredicative/irc-rss-feed-bot/releases.atom period: 12 shorten: false "#some_chan1": AWS:OpenData: url: https://registry.opendata.aws/rss.xml message: summary: true CDC:FoodSafety: url: https://tools.cdc.gov/api/v2/resources/media/316422.rss redirect: true j:AJCN: url: https://academic.oup.com/rss/site_6122/3981.xml mirror: false period: 12 blacklist: title: - ^Calendar\ of\ Events$ LitCovid: url: https://www.ncbi.nlm.nih.gov/research/coronavirus-api/export pandas: |- read_csv(file, comment="#", sep="\t") \ .assign(link=lambda r: "https://pubmed.ncbi.nlm.nih.gov/" + r["pmid"].astype("str")) \ .convert_dtypes() MedicalXpress:nutrition: url: https://medicalxpress.com/rss-feed/search/?search=nutrition r/FoodNerds: url: https://www.reddit.com/r/FoodNerds/new/.rss shorten: false sub: url: pattern: ^https://www\.reddit\.com/r/.+?/comments/(?P<id>.+?)/.+$ repl: https://redd.it/\g<id> "##some_chan2": ArXiv:cs.AI: &ArXiv url: http://export.arxiv.org/rss/cs.AI period: 1.5 https: true shorten: false group: ArXiv:cs alerts: empty: false format: re: title: '^(?P<name>.+?)\.?\ \(arXiv:.+(?P<ver>v\d+)\ ' str: title: '{name}' url: '{url}{ver}' ArXiv:cs.NE: <<: *ArXiv url: http://export.arxiv.org/rss/cs.NE ArXiv:stat.ML: <<: *ArXiv url: http://export.arxiv.org/rss/stat.ML group: null AWS:status: url: https://status.aws.amazon.com/rss/all.rss period: .2 https: true new: none sub: title: pattern: ^(?:Informational\ message|Service\ is\ operating\ normally):\ \[RESOLVED\] repl: '[RESOLVED]' format: re: id: /\#(?P<service>[^_]+) str: title: '[{service}] {title} | {summary}' url: '{id}' Fb:Research: url: https://research.fb.com/publications/ hext: |- <div> <a href:link><h3 @text:title/></a> <div class="areas-wrapper"><a href @text:category/></div> </div> <div><form class="download-form" action/></div> whitelist: category: - ^(?:Facebook\ AI\ Research|Machine\ Learning|Natural\ Language\ Processing\ \&\ Speech)$ InfoWorld: url: https://www.infoworld.com/index.rss order: reverse j:MDPI:N: # https://www.mdpi.com/journal/nutrients (open access) url: https://www.mdpi.com/rss/journal/nutrients www: false KDnuggets: url: https://us-east1-ml-feeds.cloudfunctions.net/kdnuggets new: some libraries.io/pypi/scikit-learn: url: https://libraries.io/pypi/scikit-learn/versions.atom new: none period: 8 shorten: false MedRxiv: url: - https://connect.medrxiv.org/medrxiv_xml.php?subject=Health_Informatics - https://connect.medrxiv.org/medrxiv_xml.php?subject=Nutrition alerts: read: false https: true r/MachineLearning:100+: url: https://www.reddit.com/r/MachineLearning/hot/.json?limit=50 jmespath: 'data.children[*].data | [?score >= `100`].{title: title, link: join(``, [`https://redd.it/`, id])}' shorten: false r/wallstreetbets:50+: url: https://www.reddit.com/r/wallstreetbets/hot/.json?limit=98 jmespath: 'data.children[*].data | [?(not_null(link_flair_text) && score >= `50`)].{title: join(``, [`[`, link_flair_text, `] `, title]), link: join(``, [`https://redd.it/`, id]), category: link_flair_text}' emoji: false shorten: false blacklist: category: - ^(?:Daily\ Discussion|Gain|Loss|Meme|Weekend\ Discussion|YOLO)$ PwC:Latest: url: https://us-east1-ml-feeds.cloudfunctions.net/pwc/latest period: 0.5 dedup: channel PwC:Trending: url: https://us-east1-ml-feeds.cloudfunctions.net/pwc/trending period: 0.5 dedup: channel SeekingAlpha: period: 0.2 sub: url: pattern: ^(?P<main_url>https://seekingalpha\.com/[a-z]+/[0-9]+).*$ repl: \g<main_url> shorten: false topic: "Daily calendar": \b(?i:economic\ calendar)\b "Daily prep": '^Wall\ Street\ Breakfast:\ ' "Hourly status": ^On\ the\ hour$ url: - https://seekingalpha.com/market_currents.xml - https://seekingalpha.com/feed.xml - https://seekingalpha.com/tag/etf-portfolio-strategy.xml - https://seekingalpha.com/tag/wall-st-breakfast.xml SSRN: url: https://papers.ssrn.com/sol3/Jeljour_results.cfm?form_name=journalBrowse&journal_id=3526423&Network=no&lim=false&npage=1 hext: select: <a href:link href^="https://ssrn.com/abstract=" @text:title /> follow: <a class="jeljour_pagination_number" @text:prepend("https://papers.ssrn.com/sol3/Jeljour_results.cfm?form_name=journalBrowse&journal_id=3526423&Network=no&lim=false&npage="):url/> period: 6 TalkRL: url: https://www.talkrl.com/feed period: 8 message: title: false summary: true YT:3Blue1Brown: &YT url: https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw period: 12 shorten: false style: name: bg: red fg: white bold: true sub: url: pattern: ^https://www\.youtube\.com/watch\?v=(?P<id>.+?)$ repl: https://youtu.be/\g<id> YT:AGI: url: https://www.youtube.com/results?search_query=%22artificial+general+intelligence%22&sp=CAISBBABGAI%253D hext: <a href:filter("/watch\?v=(.+)"):prepend("https://youtu.be/"):link href^="/watch?v=" title:title/> period: 12 shorten: false alerts: emptied: true blacklist: title: - \bWikipedia\ audio\ article\b YT:LexFridman: <<: *YT url: https://www.youtube.com/feeds/videos.xml?channel_id=UCSHZKyawb77ixDdsGog4iWA whitelist: title: - \bAGI\b Global settings Mandatory host: IRC server address. ssl_port: IRC server SSL port. ssl_verify: If false, the TLS/SSL certificate is not verified. Its default is true. nick: This is a registered IRC nick. If the nick is in use, it will be regained. Ensure that the email verification of the registered nick, as applicable to many IRC servers, is complete. Without this email verification being completed, the bot can fail to receive the required event 900 and therefore fail to function. Recommended admin: Administrative commands by this user pattern are accepted and executed. Its format is nick!ident@host. An example is JDoe11!sid654321@gateway/web/irccloud.com/x-*. A case-insensitive pattern match is tested for using fnmatch. alerts_channel: Some but not all warning and error alerts are sent to this channel. Its default value is ##{nick}-alerts. The key {nick}, if present in the value, is formatted with the actual nick. For example, if the nick is MyFeedBot, alerts will by default be sent to ##MyFeedBot-alerts. Since a channel name starts with #, the name if provided must be quoted. It is recommended that the alerts channel be registered and monitored. mode: This can for example be +igR for Libera and +igpR for Rizon. Optional mirror: If specified as a channel name, all posts across all channels are mirrored to this channel. This however doubles the time between consecutive posts in any given channel. Mirroring can however individually be disabled for a feed by setting <feed>.mirror. publish.github: This is the username and repo name of a GitHub repo, e.g. feedarchive/libera-feedbot-live. All posts are published to the repo, thereby providing a basic option to archive them. A new CSV file is written to the repo for each posted feed having one or more new posts. The following requirements apply: The repo must exist; it is not created by the bot. It is recommended that an empty new repo is used. If the repo is of public interest, it can be requested to be moved into the feedarchive organization by filing an issue. The GitHub user must have access to write to the repo. It is recommended that a dedicated new service account be used, not your primary user account. A GitHub personal access token is required with access to the entire repo scope. The repo scope is used for making commits. The token is provisioned for the bot via the GITHUB_TOKEN secret environment variable. Developer log.irc: If true, low level IRC events are logged by miniirc. These are quite noisy. Its default is false. once: If true, each feed is queued only once. It is for testing purposes. Its default is false. tracemalloc: If true, memory allocation tracing is enabled. The top usage and positive-diff statistics are then logged hourly. It is for diagnostic purposes. Its default is false. Feed-specific settings A feed is defined under a channel as in the sample configuration. The feed's key represents its name. The order of execution of the interacting operations is: redirect, blacklist, whitelist, https, www, emoji, sub, format, shorten. Refer to the sample configuration for usage examples. YAML anchors and references can be used to reuse nodes. Examples of this are in the sample. Mandatory <feed>.url: This is either a single URL or a list of URLs of the feed. If a list, the URLs are read in sequence with an interval of one second between them. Optional These are optional and are independent of each other: <feed>.alerts.empty: If true, an alert is sent if any source URL of the feed has no entries before their validation. If false, such an alert is not sent. Its default value is true. <feed>.alerts.emptied: If true, an alert is sent if the feed has entries before but not after their validation. If false, such an alert is not sent. Its default value is false. <feed>.alerts.read: If true, an alert is sent if an error occurs three or more consecutive times when reading or processing the feed, but no more than once every 15 minutes. If false, such an alert is not sent. Its default value is true. <feed>.blacklist.category: This is an arbitrarily nested dictionary or list or their mix of regular expression patterns that result in an entry being skipped if a search finds any of the patterns in any of the categories of the entry. The nesting permits lists to be creatively reused between feeds via YAML anchors and references. <feed>.blacklist.title: This is an arbitrarily nested dictionary or list or their mix of regular expression patterns that result in an entry being skipped if a search finds any of the patterns in the title. The nesting permits lists to be creatively reused between feeds via YAML anchors and references. <feed>.blacklist.url: Similar to <feed>.blacklist.title. <feed>.dedup: This indicates how to deduplicate posts for the feed, thereby preventing them from being reposted. The default value is feed (per-feed per-channel), and an alternate possible value is channel (per-channel). <feed>.emoji: If false, emojis in entry titles are removed. Its default value is null. <feed>.group: If a string, this delays the processing of a feed that has just been read until all other feeds having the same group are also read. This encourages multiple feeds having the same group to be be posted in succession, except if interrupted by conversation. It is however possible that unrelated feeds of any channel gets posted between ones having the same group. To explicitly specify the absence of a group when using a YAML reference, the value can be specified as null. It is recommended that feeds in the same group have the same period. <feed>.https: If true, entry links that start with http:// are changed to start with https:// instead. Its default value is false. <feed>.message.summary: If true, the entry summary (description) is included in its message. The entry title, if included, is then formatted bold. This is applied using IRC formatting if a style is defined for the feed, otherwise using unicode formatting. The default value is false. <feed>.message.title: If false, the entry title is not included in its message. Its default value is true. <feed>.mirror: If false, mirroring is disabled for this feed. Its default value is true, subject to the global-setting for mirroring. <feed>.new: This indicates up to how many entries of a new feed to post. A new feed is defined as one with no prior posts in its channel. The default value is some which is interpreted as 3. The default is intended to limit flooding a channel when one or more new feeds are added. A string value of none is interpreted as 0 and will skip all entries for a new feed. A value of all will skip no entries for a new feed; it is not recommended and should be used sparingly if at all. In any case, future entries in the feed are not affected by this option on subsequent reads, and they are all forwarded without a limit. <feed>.order: If reverse, the order of the entries is reversed. <feed>.period: This indicates how frequently to read the feed in hours on an average. Its default value is 1. Conservative polling is recommended. Any value below 0.2 is changed to a minimum of 0.2. Note that 0.2 hours is equal to 12 minutes. To make service restarts safer by preventing excessive reads, the first read is delayed by half the period. To better distribute the load of reading multiple feeds, a uniformly distributed random ±5% is applied to the period for each read. <feed>.redirect: This indicates whether to substitute each entry URL with its redirect target. The default value is false. <feed>.shorten: This indicates whether to post shortened URLs for the feed. The default value is true. The alternative value false is recommended if the URL is naturally small, or if sub or format can be used to make it small. If a "Blacklisted long URL" error is experienced for a reasonable website which should not be blacklisted, it can be reported here, using this issue as an example. <feed>.style.name.bg: This is a string representing the name of a background color applied to the feed's name. It can be one of: white, black, blue, green, red, brown, purple, orange, yellow, lime, teal, aqua, royal, pink, grey, silver. The channel modes must allow formatting for this option to be effective. <feed>.style.name.bold: If true, bold formatting is applied to the feed's name. Its default value is false. The channel modes must allow formatting for this option to be effective. <feed>.style.name.fg: Foreground color similar to <feed>.style.name.bg. <feed>.topic: This updates the channel topic with the short URL of a matching entry. It requires auto-op (+O) to allow the topic to be updated. The topic is divided into logical sections separated by | (<space><pipe><space>). For any matching entry, only its matching section in the topic is updated. Its value can be a dictionary in which each key is a section name and each value is a regular expression pattern. If a regular expression search matches an entry's title, the section in the topic is updated with the entry's short URL. The topic's length is not checked. <feed>.whitelist.category: This is an arbitrarily nested dictionary or list or their mix of regular expression patterns that result in an entry being skipped unless a search finds any of the patterns in any of the categories of the entry. The nesting permits lists to be creatively reused between feeds via YAML anchors and references. <feed>.whitelist.explain: This applies only to <feed>.whitelist.title. It can be useful for understanding which portion of a post's title matched the whitelist. If true, the first match of each posted title is italicized. This is applied using IRC formatting if a style is defined for the feed, otherwise using unicode formatting. For example, "This is a matching sample title". The default value is false. <feed>.whitelist.title: This is an arbitrarily nested dictionary or list from which all leaf values are used. The leaf values are regular expression patterns. This result in an entry being skipped unless a search finds any of the patterns in the title. The nesting permits lists to be creatively reused between feeds via YAML anchors and references. <feed>.whitelist.url: Similar to <feed>.whitelist.title. <feed>.www: If false, entry links that contain the www. prefix are changed to remove this prefix. Its default value is null. Parser For a non-XML feed, one of the following non-default parsers can be used. Multiple parsers cannot be used for a feed. The parsers are searched for in the alphabetical order listed below, and the first to be found is used. Each parsed entry must at a minimum return a title, a link, an optional summary (description), and zero or more values for category The title can be a string or a list of strings. <feed>.hext: This is a string representing the hext DSL for parsing a list of entry dictionaries from an HTML web page. Before using, it can be tested in the form here. Note that max_searches is set to 100_000 to protect against resource exhaustion. <feed>.jmespath: This is a string representing the jmespath DSL for parsing a list of entry dictionaries from JSON. Before using, it can be tested in the form here. <feed>.pandas: This is a string command evaluated using pandas for parsing a dataframe of entries. The raw content is made available to the parser as a file-like object named file. This parser uses eval which is unsafe, and so its use must be confirmed to be safe. The provisioned packages are json, numpy (as np), and pandas (as pd). The value requires compatibility with the versions of pandas and numpy defined in requirements.txt, noting that these version requirements are expected to be routinely updated. For recursive crawling, the value of a parser can alternatively be: <feed>.<parser>.select: This is the string which was hitherto documented as the value for <feed>.<parser>.. The parser uses it to return the entries to post. <feed>.<parser>.follow: The is an optional string which the parser uses to return zero or more additional URLs to read. The returned URLs can a list of strings or a list of dictionaries with the key url. Crawling applies recursively to each returned URL. Each unique URL is read once. There is an interval of at least one second between the end of a read and the start of the next read. Care should nevertheless be taken to avoid crawling a large number of URLs. Some sites require a custom user agent or other custom headers for successful scraping; such a customization can be requested by creating an issue. Conditional The sample configuration above contains examples of these: <feed>.format.re.title: This is a single regular expression pattern that is searched for in the title. It is used to collect named key-value pairs from the match if there is one. <feed>.format.re.url: Similar to <feed>.format.re.title. <feed>.format.str.title: The key-value pairs collected using <feed>.format.re.title and <feed>.format.re.url, both of which are optional, are combined along with the default additions of title, url, categories, and feed.url as keys. Any additional keys returned by the parser are also available. The key-value pairs are used to format the provided quoted title string. If the title formatting fails for any reason, a warning is logged, and the title remains unchanged. The default value is {title}. <feed>.format.str.url: Similar to <feed>.format.str.title. The default value is {url}. If this is specified, it can sometimes be relevant to set shorten to false for the feed. <feed>.sub.summary.pattern: This is a single regular expression pattern that if found results in the entry summary being substituted. <feed>.sub.summary.repl: If <feed>.sub.summary.pattern is found, the entry summary is replaced with this replacement, otherwise it is forwarded unchanged. <feed>.sub.title.pattern: Similar to <feed>.sub.summary.pattern. <feed>.sub.title.repl: Similar to <feed>.sub.summary.repl. <feed>.sub.url.pattern: Similar to <feed>.sub.summary.pattern. If a pattern is specified, it can sometimes be relevant to set shorten to false for the feed. <feed>.sub.url.repl: Similar to <feed>.sub.summary.repl. Feed default settings A global default value can optionally be set under defaults for some feed-specific settings, namely new and shorten. This value overrides its internal default. It facilitates not having to set the same value individually for many feeds. Refer to "Feed-specific settings" for the possible values and internal defaults of these settings. Refer to the embedded sample configuration for a usage example. Commands Commands can be sent to the bot either as a private message or as a directed public message. Private messages may however be prohibited for security purposes using the mode configuration. Public messages to the bot must be directed as MyBotNick: my_command. Administrative Administrative commands are accepted from the configured admin. If admin is not configured, the commands are not processed. It is expected but not required that administrative commands to the bot will typically be sent in the alerts_channel. The supported commands are: exit: Gracefully exit with code 0. The exit is delayed until any feeds that are currently being posted finish posting and being written to the database. If running the bot as a Docker Compose service, using this command with restart: on-failure will (due to code 0) prevent the bot from automatically restarting. Note that a repeated invocation of this command has no effect. fail: Similar to exit but with code 1. If running the bot as a Docker Compose service, using this command with restart: on-failure will (due to a nonzero code) cause the bot to automatically be restarted. quit: Alias of exit. Deployment As a reminder, it is recommended that the alerts channel be registered and monitored. It is recommended that the bot be auto-voiced (+V) in each channel. Failing this, messages from the bot risk being silently dropped by the server. This is despite the bot-enforced limit of two seconds per message across the server. It is recommended that the bot be run as a Docker container using using Docker ≥18.09.2, possibly with Docker Compose ≥1.24.0. To run the bot using Docker Compose, create or add to a version-controlled docker-compose.yml file such as: version: '3.7' services: irc-rss-feed-bot: container_name: irc-rss-feed-bot image: ascensive/irc-rss-feed-bot:<VERSION> # network_mode: host # If having DNS name resolution issues. restart: on-failure # restart: always logging: options: max-size: 2m max-file: "5" volumes: - ./irc-rss-feed-bot:/config env_file: - ./irc-rss-feed-bot/secrets.env environment: TZ: America/New_York # Select TZ database name from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones In the above service definition in docker-compose.yml: image: Use a specific versioned tag, e.g. 0.12.0. volumes: Customize the relative path to the previously created config.yaml file, e.g. ./irc-rss-feed-bot. This volume source directory must be writable by the container using the UID defined in the Dockerfile; it is 999. A simple way to ensure it is writable is to run a command such as chmod -R a+w ./irc-rss-feed-bot once on the host. env_file: Customize the relative path to secrets.env. environment: Optionally customize the environment variable TZ to the preferred time zone as represented by a TZ database name. Note that the date and time are prefixed in each log message. From the directory containing docker-compose.yml, run docker-compose up -d irc-rss-feed-bot. Use docker logs -f irc-rss-feed-bot to see and follow informational logs. Maintenance Service It is recommended that the supported administrative commands be used together with Docker Compose or a comparable container service manager to shutdown or restart the service. Config If config.yaml is updated, the container must be restarted to use the updated file. If secrets.env or the service definition in docker-compose.yml are updated, the container must be recreated (and not merely restarted) to use the updated file. Database A posts.v2.db database file is written by the bot in the same directory as config.yaml. This database file must be preserved with routine backups. After restoring a backup, before starting the container, ensure the database file is writable by running a command such as chmod a+w ./irc-rss-feed-bot/posts.v2.db. The database file grows as new posts are made. For the most part this indefinite growth can be ignored. Currently, the standard approach for handling this, if necessary, is to stop the bot and delete the database file if it has grown unacceptably large. Restarting the bot after deleting the database will then create a new database file, and all configured feeds will be handled as new. This deletion is however discouraged as a routine measure. Disk cache An ephemeral directory /app/.ircrssfeedbot_cache is written by the bot in the container. It contains one or more independent disk caches. The size of each independent disk cache in this directory is limited to approximately 2 GiB. If needed, this directory can optionally be mounted as an external volume. -
Version 1.0.0
0 downloads
Laravel.io's irc bot for #laravel on freenode. This version is designed to be deployed on Heroku. This README was generated for you by hubot to help get you started. Definitely update and improve to talk about your own instance, how to use and deploy, what functionality he has, etc! Testing Hubot Locally You can test your hubot by running the following. % bin/hubot You'll see some start up output about where your scripts come from and a prompt. [Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading adapter shell [Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/tomb/Development/hubot/scripts [Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/tomb/Development/hubot/src/scripts Hubot> Then you can interact with hubot by typing hubot help. Hubot> hubot help Hubot> animate me <query> - The same thing as `image me`, except adds a few convert me <expression> to <units> - Convert expression to given units. help - Displays all of the help commands that Hubot knows about. ... Scripting Take a look at the scripts in the ./scripts folder for examples. Delete any scripts you think are useless or boring. Add whatever functionality you want hubot to have. Read up on what you can do with hubot in the Scripting Guide. Redis Persistence If you are going to use the redis-brain.coffee script from hubot-scripts (strongly suggested), you will need to add the Redis to Go addon on Heroku which requires a verified account or you can create an account at Redis to Go and manually set the REDISTOGO_URL variable. % heroku config:add REDISTOGO_URL="..." If you don't require any persistence feel free to remove the redis-brain.coffee from hubot-scripts.json and you don't need to worry about redis at all. Adapters Adapters are the interface to the service you want your hubot to run on. This can be something like Campfire or IRC. There are a number of third party adapters that the community have contributed. Check Hubot Adapters for the available ones. If you would like to run a non-Campfire or shell adapter you will need to add the adapter package as a dependency to the package.json file in the dependencies section. Once you've added the dependency and run npm install to install it you can then run hubot with the adapter. % bin/hubot -a <adapter> Where <adapter> is the name of your adapter without the hubot- prefix. hubot-scripts There will inevitably be functionality that everyone will want. Instead of adding it to hubot itself, you can submit pull requests to hubot-scripts. To enable scripts from the hubot-scripts package, add the script name with extension as a double quoted string to the hubot-scripts.json file in this repo. external-scripts Tired of waiting for your script to be merged into hubot-scripts? Want to maintain the repository and package yourself? Then this added functionality maybe for you! Hubot is now able to load scripts from third-party npm packages! To enable this functionality you can follow the following steps. Add the packages as dependencies into your package.json npm install to make sure those packages are installed To enable third-party scripts that you've added you will need to add the package name as a double quoted string to the external-scripts.json file in this repo. Deployment % heroku create --stack cedar % git push heroku master % heroku ps:scale app=1 If your Heroku account has been verified you can run the following to enable and add the Redis to Go addon to your app. % heroku addons:add redistogo:nano If you run into any problems, checkout Heroku's docs. You'll need to edit the Procfile to set the name of your hubot. More detailed documentation can be found on the deploying hubot onto Heroku wiki page. Deploying to UNIX or Windows If you would like to deploy to either a UNIX operating system or Windows. Please check out the deploying hubot onto UNIX and deploying hubot onto Windows wiki pages. Campfire Variables If you are using the Campfire adapter you will need to set some environment variables. Refer to the documentation for other adapters and the configuraiton of those, links to the adapters can be found on Hubot Adapters. Create a separate Campfire user for your bot and get their token from the web UI. % heroku config:add HUBOT_CAMPFIRE_TOKEN="..." Get the numeric IDs of the rooms you want the bot to join, comma delimited. If you want the bot to connect to https://mysubdomain.campfirenow.com/room/42 and https://mysubdomain.campfirenow.com/room/1024 then you'd add it like this: % heroku config:add HUBOT_CAMPFIRE_ROOMS="42,1024" Add the subdomain hubot should connect to. If you web URL looks like http://mysubdomain.campfirenow.com then you'd add it like this: % heroku config:add HUBOT_CAMPFIRE_ACCOUNT="mysubdomain" Restart the bot You may want to get comfortable with heroku logs and heroku restart if you're having issues.