ctcp version reply for help based channel

By Cheiron on Jan 21, 2009

This is a code for any users working in a scripters or help style channel.

What it does is ctcp version the user and /onotices the room ops the reply so they can see the users irc client. That in turn will help the room ops answer questions relating to the script related issues as they will know what to look up.

Huge thank-you's to DX for lending his skills for the initial code. had to bug fix it with a hand from my friend TequillaMockingbird as the original code was posted untested as stated for the idea to work around.

This script will run on mIRC v6.35 and on UnrealIRCd 3.2.7 with anope services. Please place this script into your mIRC remotes folder and change where it says #channelname to the name of your help/scripters channel. Also dont forget to ensure the bot or user's script this goes on must have a minium chanserv level of AOP or @ for it to work

on *:JOIN:#: {
  set %.ch $chan
  CTCP $nick VERSION
}
on 1:CTCPREPLY:VERSION*:/onotice #channelname $nick is using IRC client: $1-

Comments

Sign in to comment.
Merbo   -  Mar 17, 2011

One little suggestion:

on *:JOIN:#: {
  set %.ch $chan
  CTCP $nick VERSION
}

on 1:CTCPREPLY:VERSION*:/onotice #channelname $nick is using IRC client: $1-

/onotice requires op status on the channel.
Also, you're using #channelname, which is telling the script to notice the channel #channelname.
Try your variable %.ch instead.
Easy fix:

on @*:JOIN:#: {
  set %.ch $chan
  CTCP $nick VERSION
}
on 1:CTCPREPLY:VERSION*:/onotice %.ch $nick is using IRC client: $1-

The @ sign in front of the event denotes OP status.

 Respond  
Aurora801   -  Jul 19, 2009

I dunno if you added it, but if you want to, it might help with something like this:

on *:JOIN:#HelpChan: {
 ctcp $nick VERSION
 msg #HelpChan Version Info for .: $+ $nick $+ :.
}
on ^*:CTCPREPLY:VERSION*: { msg #HelpChan $remove($1-,VERSION) $1- }

on *:OPEN:#: {
if ($active == #HelpChan) { enable #Menu.Help | halt }
else { halt }
}

#Menu.Help off
menu channel {
Help
.Ctcp ( $+ $1 $+ )
..Version:/ctcp $1 VERSION
..Ping:/ctcp $1 PING
..Time:/ctcp $1 Time
..Custom:/ctcp $1 $$?"Ctcp?"
.AutoVoice: {
 if ($group(#AutoVoice.Help) = on) { disable #AutoVoice.Help | echo -a AutoVoice Disabled. | halt {
 if ($group(#AutoVoice.Help) = off) { enable #AutoVoice.Help | echo -a AutoVoice Enabled. | halt }
if (!$grou(#AutoVoice.Help)) { echo -a Auto Voice system Does Not Exist. | halt }
 }
}
#Menu.Help end

#AutoVoice.Help off
on *:JOIN:#HelpChan: { mode $chan +v $nick }
#AutoVoice.Help end

That's just me. But I think it'd work. I'll test it to make sure it works. :]

 Respond  
PuNkTuReD   -  Jan 23, 2009

ok so i brang 3 online
Rage_Virus = Bot with script
The_Infected = Op
PuNkTuReD = nick joining channel

i also added a few echos to see where it stops etc

when i bring PuNkTuReD into the room he sees(recieves ctcp by the bot)

[22:56] [Rage_Virus VERSION]

the bot sees

PuNkTuReD joined, now sending ctcp
recieved reply from PuNkTuReD now sending onotice
[22:56] [PuNkTuReD VERSION reply]: mIRC v6.35 Khaled Mardam-Bey

and on mine ( The Op ) sees

[22:56] -Rage_Virus:@#Help- PuNkTuReD is using IRC client: VERSION mIRC v6.35 Khaled Mardam-Bey

with this code

menu * {
  $$iif($$1,$style(0)) Get $+(,$$1,$chr(39),s) CTCP Version: CTCP $$1 VERSION
}
on *:JOIN:#: {
  if $nick == $me { echo -a I joined so i wont ctcp myself | halt }
  else { echo -a $nick joined, now sending ctcp | set %.ch $chan | CTCP $nick VERSION } 
}
on 1:CTCPREPLY:VERSION*: { echo -a recieved reply from $nick now sending onotice | onotice $($+(%,.,ch),2) $nick is using IRC client: $1- }
 Respond  
Cheiron   -  Jan 23, 2009

every time i use anything other than that one i submitted, the ctcp reply doesnt work. i am totally bogswaddled.. i did notice your if statement though was wrong > if $nick == $me { halt } should be > if ($nick == $me) {halt} maybe that was why. not sure. also.. i have a main theme engine running on my other script on the same pc and connection. would that affect it at all? the bot is plain mirc, nothing added. my main script is kickchat$ript v2.0 sat on mirc with a whole multitude of custom tweaks, snippets and add-ons on it

 Respond  
PuNkTuReD   -  Jan 23, 2009

hmm /me is stumped

so my version didnt send the ctcp?
have you got any other on join events
that halt?

 Respond  
Cheiron   -  Jan 23, 2009

that is so bizzare lol.. i am flumoxed. the bot is a simple bare mirc 6.35 with just a simple !help command menu with !topics to display. the ctcp is the only main script on it

 Respond  
PuNkTuReD   -  Jan 23, 2009

ok heres mine lol
I = The_Infected
Bot = Rage_Virus

the script is in the bot

when i join i see this ( BTW i am joining as an Op )

[21:19] [Rage_Virus VERSION]
[21:19] -Rage_Virus:@#Help- The_Infected is using IRC client: VERSION mIRC v6.35 Khaled Mardam-Bey

in the bots status screen i see this ( The bot is also an Op )

[21:19] -> [The_Infected] VERSION

[21:19] -> Ops #Help: The_Infected is using IRC client: VERSION mIRC v6.35 Khaled Mardam-Bey

and in the bots active channel i get

[21:19] [The_Infected VERSION reply]: mIRC v6.35 Khaled Mardam-Bey

 Respond  
Cheiron   -  Jan 23, 2009

i actually got a ctcp though from him on my own ctcp version on my script. > 12<21012:214am12> [DragonKnight VERSION reply]: mIRC32 v5.9 K.Mardam-Bey the bot did not do the ctcp. hence why i was using the code i had. this should be an interesting one for you

just popped my one back on and got this from the bot onoticed on my script > 12<21012:238am12> * Joins: KokoRyu (kokoryu@)
12<21012:238am12> -KokoRyu- CTCP VERSION REPLY: KokoRyuScript by KokoRyu on mIRC 6.35

this is on the bot itself

[10:38] -KokoRyu- CTCP VERSION REPLY: KokoRyuScript by KokoRyu on mIRC 6.35
[10:38] [KokoRyu VERSION reply]: mIRC v6.35 Khaled Mardam-Bey

 Respond  
PuNkTuReD   -  Jan 23, 2009

i had a few probs with some nicks that did not accept ctcps
but apart from that it was fine for me

 Respond  
Cheiron   -  Jan 23, 2009

right.. had a tester come in and nought.. no /onotice from it. looking in status window.. all i got was this

-
[09:14] -> [Cheiron] VERSION

[10:14] -> [DragonKnight] VERSION

 Respond  
Cheiron   -  Jan 23, 2009

i have shunted that up on a side bot PunkTuReD to have a look at it and seehow it runs. will let you shortly.

 Respond  
PuNkTuReD   -  Jan 23, 2009

try

change #channel_to_monitor
to your channel name

menu * {
  $$iif($$1,$style(0)) Get $+(,$$1,$chr(39),s) CTCP Version: CTCP $$1 VERSION
}
on *:JOIN:#channel_to_monitor: {
  if $nick == $me { halt }
  else { set %.ch $chan | CTCP $nick VERSION } 
}
on 1:CTCPREPLY:VERSION*: { onotice $($+(%,.,ch),2) $nick is using IRC client: $1- }
 Respond  
F*U*R*B*Y*   -  Jan 22, 2009

.....

/timer 0 0 cycle #helpchannel

alias cycle {
  part $1
  join $1
}
 Respond  
Cheiron   -  Jan 22, 2009

the reason i brought it here was for the site members to view over, try and comment on as opposed to keeping it in the snippet request section where it no longer belonged once the script was a worker. the variable was originally set for the onotice section

 CTCP *:VERSION:?: { onotice %.ch $1- } 

but that did not work. so we tried a few changes to no avail until we spotted the mistake and edited it to

 on 1:CTCPREPLY:VERSION*:/onotice $nick is using IRC client: $1-  

still didnt work we slotted in the #channel part

 on 1:CTCPREPLY:VERSION*:/onotice #channelname $nick is using IRC client: $1- 

and got a worker :) the left over variable was overlooked.

as for the menu idea... that sounds a good idea. how would you go about it though?

 Respond  
PuNkTuReD   -  Jan 22, 2009

i think it was bought up on the forum post, but why do you set the variable if its not needed?
this is a handy lil snippet to have on hand tho.
maybe add a menu so even tho youve checked their version on join
you may need to check it again, so having an easy accessable menu option would be nice

 Respond  
Cheiron   -  Jan 22, 2009

no takers yet. it would have been interesting to have seen your views and comments to its use/functionality and how it could be expanded

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.