Home
Explore
Apps
Scripts
Code Snippets
Hardware
Images
Home
Explore
Apps
Scripts
Code Snippets
Hardware
Images
Sign up to Hawkee
Sign in
1
Like
!ajoin add/del for bot
By
TochA1551
Published
Jul 11, 2011
Updated
Jul 12, 2011
URL
www.hawkee.com
552
10
Description
Use !ajoin add for add channel to ur bot ajoin list , use !ajoin del for delete channel.
Works only if bot owner will type it.
Code
on *:text:!ajoin*:#: { if ($nick == <bot_owner_nick>) { if ($2 == add) { msg $chan 8,12I add $chan to my ajoin list ! ns ajoin add $chan } elseif ($2 == del) { msg $chan 8,12I deleted $chan from my ajoin list ! ns ajoin del $chan } } } ======================== or on *:TEXT:!ajoin*:#: { if ($nick == <bot_owner_nick>) { if ($2 == add) { if ($istok(%auto.channels,$3,44)) { } else { set %auto.channels $addtok(%auto.channels,$3,44) msg $chan 8,12I add $3 to my ajoin list ! join $3 } } elseif ($2 == del) { if ($istok(%auto.channels,$3,44)) { set %auto.channels $remtok(%auto.channels,$3,44) msg $chan 8,12I deleted $3 from my ajoin list ! part $3 } } } }
Comments
Sign in
to comment.
toclafane1
-
Feb 21, 2012
Maybe something like:
Code
on *:CONNECT:{ var %ajoin = 1 while (%ajoin <= $lines(ajoin.txt)) { join $read(ajoin.txt, %ajoin) inc %ajoin } } on $*:Text:/^!ajoin\s(.*)/Si:#:{ if ($regex($nick($chan,$nick).pnick,/(!|@|&|~)/)) { if ($2 == add) { if ($read(ajoin.txt, w, $3)) msg $chan $3 is already on my ajoin list. else write ajoin.txt $3 | msg $chan $3 added to my ajoin list } if ($2 == del) { if (!$read(ajoin.txt, w, $3)) msg $chan 3 is not on my ajoin list to delete. else write -ds $+ $3 ajoin.txt | msg $chan $3 removed from my ajoin list. } if ($2 == count) { msg $chan I have $lines($read(ajoin.txt, w, $3)) channel's on my ajoin list. } } }
?
Kentaro Kurosaki
-
Feb 21, 2012
Another fyi not all networks have /ns ajoin ;p
GeekShedboy123
-
Jul 23, 2011
ahh. thanks :)
TochA1551
-
Jul 23, 2011
Code
if ($nick == GeekShedboy123) {
for example
GeekShedboy123
-
Jul 23, 2011
Do u put my nick where Bot_owner_nick is? if so how should it look.
Lenooox
-
Jul 12, 2011
i'm not sure , but try this :$ improve me if I'm wrong
Code
on *:TEXT:!ajoin*:#: { if ($nick == <bot_owner_nick>) { if ($2 == add) { if ($istok(%auto.channels,$3,44)) { } else { set %auto.channels $addtok(%auto.channels,$3,44) msg $chan 8,12I add $3 to my ajoin list ! join $3 } } elseif ($2 == del) { if ($istok(%auto.channels,$3,44)) { set %auto.channels $remtok(%auto.channels,$3,44) msg $chan 8,12I deleted $3 from my ajoin list ! part $3 } } } }
Lenooox
-
Jul 12, 2011
hmm , you can add only one channel to ajoin list?
GeekShedboy123
-
Jul 12, 2011
hmm.. wont work for me...
PyThOn
-
Jul 11, 2011
Good intention TochA1551. :)
napa182
-
Jul 11, 2011
um TochA1551 these lil snippets of code are not really a script so maybe you should edit them as a snippet.