Launching an IRC bot under the current nickname?

I am developing my own irc bot and in the channel I'm in, one of the ops is able to activate the bot, but run it under its nickname without adding a new nickname connecting the channel.

For example, a nickname guy @James, and he activated a bot that says hello when you do .hello:

+John: .hello
@James: Hello, John.

Any idea how this is possible? The only way I was able to launch my bot was to connect it to the server and channel with a completely new nickname.

+4
source share
2 answers

, /. IRC ( MIRC HexChat/X-Chat). , , , , - . , , , , IRC.

+3

2

eggdrops
mIRCScripting

script ,

 on $*:text:/^\.h(i|ello)$/iS:#:{
   msg $chan $+(h,$regml(1)) $nick
 }

, mIRC
, ,

on $*:text:/^\.h(i|ello)$/iS:#:{
    if ($me == botname) {
   msg $chan $+(h,$regml(1)) $nick
 }
}

script ,

0

Source: https://habr.com/ru/post/1538253/


All Articles