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.

making the bot say via /msg

Old posts that have not been replied to for several years.
Locked
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

making the bot say via /msg

Post by NewzUK »

Hi

Is it possible to to make the bot say something in the channel via /msg without having to be in telnet or DCC to the bot?

I've tried /msg bot say thingtosay password but no response...

Thanks!
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

See this post.
Once the game is over, the king and the pawn go back in the same box.
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

thank you! :D
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Also, you may try this:

Code: Select all

# binds #
bind msg - say pub:say
bind msg - act pub:act

# msg #
proc pub:say {nick uhost hand text} { 
  if {[llength [split $text]] < 2} {
    putserv "PRIVMSG $nick :\002Usage\002: say #channel text"
    return
  }
  set channel [lindex $text 0]
  set msg [lrange $text 1 end]
  if {![validchan $channel] || ![botonchan $channel]} {
    putserv "PRIVMSG $nick :I'm not monitoring $channel or I'm not there."
    return
  }
  putserv "PRIVMSG $channel :$msg"
}

# act #
proc pub:act {nick uhost hand text} { 
  if {[llength [split $text]] < 2} {
    putserv "PRIVMSG $nick :\002Usage\002: act #channel text"
    return
  }
  set channel [lindex $text 0]
  set msg [lrange $text 1 end]
  if {![validchan $channel] || ![botonchan $channel]} {
    putserv "PRIVMSG $nick :I'm not monitoring $channel or I'm not there."
    return
  }
  putserv "PRIVMSG $channel :\001ACTION $msg"
}
Once the game is over, the king and the pawn go back in the same box.
d
dazed0r

Post by dazed0r »

I was wondering if you could show me a way with that code that makes it possible for the bot to message someone privatley?

I have my bot on a nick that gets messaged all the time by people (I created a script that has the bot message the priv msg to a channel), I want to be able to do "@msg nickname text here" and send the "text here" part to the nick.

Thanks. :)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

# binds # 
bind msg - say pub:say 
bind msg - act pub:act 

# msg # 
proc pub:say {nick uhost hand text} { 
  if {[llength [split $text]] < 2} { 
    putserv "PRIVMSG $nick :\002Usage\002: say <who> <text>" 
    return 
  } 
  set who [lindex $text 0] 
  set msg [lrange $text 1 end] 
  putserv "PRIVMSG $who :$msg" 
} 

# act # 
proc pub:act {nick uhost hand text} { 
  if {[llength [split $text]] < 2} { 
    putserv "PRIVMSG $nick :\002Usage\002: act <who> <text>" 
    return 
  } 
  set who [lindex $text 0] 
  set msg [lrange $text 1 end] 
  putserv "PRIVMSG $who :\001ACTION $msg" 
} 
Once the game is over, the king and the pawn go back in the same box.
Locked