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.

Joining a channel

General support and discussion of Eggdrop bots.
Post Reply
s
scyzernix
Voice
Posts: 9
Joined: Sun Aug 08, 2010 12:02 am

Joining a channel

Post by scyzernix »

I know it's kinda a dumb question
but seriously, how do I assign my bot to a channel.
Been searching everywhere but cant seem to find out.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Hi,
Though not a 'dumb' kind of question, it might be a RTFM kind.. ;)

That said, up until 1.6.19 (inclusive), the usual way of adding (static) channels were through the config file using the 'channel add' command. Further channels could also be added on-the-fly using the .+chan dcc-partyline command.
As I roughly recall, the .+chan command is the preferred way since 1.6.20.
NML_375
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Re: Joining a channel

Post by blake »

scyzernix wrote:I know it's kinda a dumb question
but seriously, how do I assign my bot to a channel.
Been searching everywhere but cant seem to find out.
You may find this useful it safes having to enter the partyline to add channels in the bots private message just type addchan #channelname

Code: Select all

bind msg n addchan addchan
proc addchan {nick host hand text} {
   set chan [join [lindex [split $text] 0]]
   if {![string length $chan]} {
      putserv "PRIVMSG $nick :You need to specify which channel to join."
      return 0
   }
   if {[validchan $chan]} {
      if {[channel get $chan "inactive"]} {
         channel set $chan -inactive
         return 0
      }
      putserv "PRIVMSG $nick :I am already on $chan."
      return 0
   }
   channel add $chan
}

bind msg n delchan delchan
proc delchan {nick host hand text} {
   set chan [join [lindex [split $text] 0]]
   if {![string length $chan]} {
      putserv "PRIVMSG $nick :You need to specify which channel to remove."
      return 0
   }
   if {![validchan $chan]} {
      putserv "PRIVMSG $nick :Unknown channel: $chan."
      return 0
   }
   channel remove $chan
}
s
scyzernix
Voice
Posts: 9
Joined: Sun Aug 08, 2010 12:02 am

Post by scyzernix »

nml375 wrote:Hi,
Though not a 'dumb' kind of question, it might be a RTFM kind.. ;)

That said, up until 1.6.19 (inclusive), the usual way of adding (static) channels were through the config file using the 'channel add' command. Further channels could also be added on-the-fly using the .+chan dcc-partyline command.
As I roughly recall, the .+chan command is the preferred way since 1.6.20.
Lol. That, I know. Thanks for answering the RTMF ques.
blake wrote:
scyzernix wrote:I know it's kinda a dumb question
but seriously, how do I assign my bot to a channel.
Been searching everywhere but cant seem to find out.
You may find this useful it safes having to enter the partyline to add channels in the bots private message just type addchan #channelname

Code: Select all

bind msg n addchan addchan
proc addchan {nick host hand text} {
   set chan [join [lindex [split $text] 0]]
   if {![string length $chan]} {
      putserv "PRIVMSG $nick :You need to specify which channel to join."
      return 0
   }
   if {[validchan $chan]} {
      if {[channel get $chan "inactive"]} {
         channel set $chan -inactive
         return 0
      }
      putserv "PRIVMSG $nick :I am already on $chan."
      return 0
   }
   channel add $chan
}

bind msg n delchan delchan
proc delchan {nick host hand text} {
   set chan [join [lindex [split $text] 0]]
   if {![string length $chan]} {
      putserv "PRIVMSG $nick :You need to specify which channel to remove."
      return 0
   }
   if {![validchan $chan]} {
      putserv "PRIVMSG $nick :Unknown channel: $chan."
      return 0
   }
   channel remove $chan
}
Thanks, I have to try this one out. The code should be pasted in the .conf correct?
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Eather add it to the end of the config or add it as a script
Post Reply