This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

nick list through botnet

Old posts that have not been replied to for several years.
Locked
k
kanibus
Halfop
Posts: 44
Joined: Tue May 03, 2005 7:22 am

nick list through botnet

Post by kanibus »

hey i am running a channel relay script that works perfect. i was just wondering is there anyway to have it so that is someone types !nicks or something similar it would display the channel list for both channels?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

bind pub - !nicks foo
bind bot - nickq bar
bind bot - nicka moo
proc foo {n u h c t} {
   putbot $t "nickq $n $c"
}
proc bar {f c t} {
   foreach {n c} [split $t] {break}
   putbot $f "nicka $n $c [join [chanlist $c]]"
}
proc moo {f c t} {
   foreach {n c} [split $t] {break}
   puthelp "notice $n :nicks on $f's channel $c: [join [lrange [split $t] 2 e]]"
}
k
kanibus
Halfop
Posts: 44
Joined: Tue May 03, 2005 7:22 am

Post by kanibus »

hey thanks for the quick response demond. i am getting 'bot not on the botnet' though, im not sure that i edited your script quite right. i changed nickq to the bot i am configuring the script on, and nicka as the bot in the other channel. thanks for your help :D
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

no no, don't edit anything, all you need to do is to run this on both bots and type !nicks otherbot on channel, where otherbot is the nick of the bot on the other side
k
kanibus
Halfop
Posts: 44
Joined: Tue May 03, 2005 7:22 am

Post by kanibus »

ahhh works perfect, thanks. :P now if i wanted to strip Chanserv and the botnick?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

proc bar {f c t} {
   foreach {n c} [split $t] {break}
   set t [chanlist $c] 
   foreach e [list $::botnick ChanServ] {
      if {[set i [lsearch -exact $t $e]] != -1} {
         set $t [lreplace $t $i $i]
      }
   }
   putbot $f "nicka $n $c [join $t]"
} 
Locked