mIRC Home    About    Download    Register    News    Help

Print Thread
#211683 28/04/09 05:01 PM
Joined: Sep 2008
Posts: 37
R
razor32 Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2008
Posts: 37
Hi,

I was looking at making this kind of script where i can use a certain kind of command (such as ^msg - not !) for a game i play and we have this server hooked up to irc echo which im an admin on so if i use @^hi <name> it would send that message in that channel. @ being the command which is used for admin chat.

I was trying to make it out of this script that a former admin made but it was to hard for me even to figure out what to do

Code:
on *:TEXT:!unbanlast:#chan.echo:{
  msg $chan !lastban
  set %fwhere IRC
  set %fwho $nick
  /set %askIP true


That was the command i was gonna make it out of but don't think it would work anyways.

The server echo's the admin chat in the channel for halfop and plus (%, @, & etc) and would look like this in the channel:

<%gamebotname> *** Admin GameName (ID:??):

So if i wanted to send a msg into that echo channel it would look like:

<%gamebotname> *** Admin GameName (ID:??): ^hi there

and then my bot would see it and send the msg to echo like:

<name> hi there


Thats it, It probs sounds hard by the way i'v explained it but i tried to explain it the best i could.

Other mods and admins have this kind of thing but wont give me the script frown.


Anyways if you can help me i will be very greatful.

razor32 #211686 28/04/09 06:43 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Quote:
@ being the command which is used for admin chat.
Just to play safe - this @ is processed by something on the network, not by a local script or the like, right?

Quote:
The server echo's the admin chat in the channel
Are these "echoes" normal channel messages? By a specific nickname?

And (if I get you right), your bot will run the script, and be in that channel where messages arrive like:
Quote:
<%gamebotname> *** Admin GameName (ID:??): ^hi there
Where to shall the bot, after seeing a message starting with the ^-char, forward this message (e.g. the "hi there")? To the same channel (doubling the message so to say, so it is send back to the game)?
And shall the bot forward only messages with a certain GameName / ID / "level", or every messages that starts with "^"? Without any limitation, the script would allow all users that have "access" to the @-chat (and use the ^-char) to forward messages through your bot.


Horstl #211692 28/04/09 07:49 PM
Joined: Sep 2008
Posts: 37
R
razor32 Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2008
Posts: 37
Quote:
@ being the command which is used for admin chat.
Quote:
Just to play safe - this @ is processed by something on the network, not by a local script or the like, right?

The @ is the command to use in the server (game server) so admins/mods can talk to each other without normal players seeing them. The actually @ isn't in my local scripts or anything such as remote, aliases, popups etc.


Quote:
The server echo's the admin chat in the channel
Quote:
Are these "echoes" normal channel messages? By a specific nickname?

The echoes are messages being sent in to the channel by about 10 different bots from the server. (Can get a screenshot of it to show you)

Quote:
And (if I get you right), your bot will run the script, and be in that channel where messages arrive like:
Quote:
<%gamebotname> *** Admin GameName (ID:??): ^hi there
Where to shall the bot, after seeing a message starting with the ^-char, forward this message (e.g. the "hi there")? To the same channel (doubling the message so to say, so it is send back to the game)?
And shall the bot forward only messages with a certain GameName / ID / "level", or every messages that starts with "^"? Without any limitation, the script would allow all users that have "access" to the @-chat (and use the ^-char) to forward messages through your bot.

I don't quite follow you but basicly i would be in the game server but if someone was trying to talk to me in the channel but im ingame i just do @^hi, whats up? and then my bot would send the message in the channel to say 'hi, whats up?'

I can get a screenshot of what i mean if you need it smile

Last edited by razor32; 28/04/09 07:51 PM.
razor32 #211693 28/04/09 07:59 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Well... if you type "@hi, whats up" in-game, this is visible in-game to admins/mods. And it appears in the "#chan.echo" channel.
What I don't get is... why do you want your bot to send this message to the cannel "#chan.echo" again (without the "*** Admin GameName (ID:??):" part) confused

Another question: "GameName" is a placeholder I assume - and the ?? at the ID too. Is "Admin" always "Admin", or does your game nickname appear here? Is is always the same word/nick?
(I thought it's a good idea to limit the script to yourself, in some way - dunno if this is what you have in mind :))

Last edited by Horstl; 28/04/09 08:14 PM.
Horstl #211707 28/04/09 11:36 PM
Joined: Sep 2008
Posts: 37
R
razor32 Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2008
Posts: 37
Originally Posted By: Horstl
Well... if you type "@hi, whats up" in-game, this is visible in-game to admins/mods. And it appears in the "#chan.echo" channel.
What I don't get is... why do you want your bot to send this message to the cannel "#chan.echo" again (without the "*** Admin GameName (ID:??):" part) confused

So it looks like im talking out of game, Because if people want my help they would use !msg to send a message to me and then i can respond to them using @^msg and make it look like im talking to him in the irc channel

Originally Posted By: Horstl
Another question: "GameName" is a placeholder I assume - and the ?? at the ID too. Is "Admin" always "Admin", or does your game nickname appear here? Is is always the same word/nick?
(I thought it's a good idea to limit the script to yourself, in some way - dunno if this is what you have in mind :))

Erm, Again i don't understand what you mean by placeholder (sorry, i feel stupid :() But yeah i would like it if it only worked for me.

Anyways, I took a screenshot of what the echo channel looks like and how the messages would appear like which are being echoed to the channel.

Tinyimage: http://i42.tinypic.com/1xnjr.png
Imageshack: http://img513.imageshack.us/img513/5149/talkirc.png

Last edited by razor32; 28/04/09 11:37 PM.
razor32 #211710 29/04/09 12:13 AM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Hum, so I assume the message of the bots has always "Admin" after the ***.

Try this (put it in your bot as a "remote" script, and replace #CHANNELNAME with the name of the channel):
Code:
on $*:text:/^\*{3} Admin \S+ \(ID\72\d+\)\72 \^(.+)/S:#CHANNELNAME: { msg $chan $regml(1) }


If this works, to make it a *bit* more secure,
- if the bots who send the messages always are % in the channel
- and if the bots who send the messages always have a nick like "N?w?n?"
use this one instead:
Code:
on *:text:*:#CHANNELNAME: {
  if ($nick ishop $chan) && ($regex($nick,/^N[aeiou]w[aeiou]n[aeiou]$/i)) {
    if ($regex($1-,/^\*{3} Admin \S+ \(ID:\d+\): \^(.+)/S)) { msg $chan $regml(1) }
  }
}


...hope it works at all smile

Horstl #211711 29/04/09 12:20 AM
Joined: Sep 2008
Posts: 37
R
razor32 Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2008
Posts: 37
Excellent! Works perfectly laugh


Link Copied to Clipboard