Skip to content
General IRCX

expert help

A TG007 community discussion started by DigitalX.

Discussion 22 posts
Page 1 of 2
Open
Topic #1535 · 22 published posts · 5,277 views

ok this may sound a bit nuts but im making a friend a helpdesk script. its clones alot of msn helpdesk style things i need a thing that helps the person who the ircop in the helpdesk helping people....

 

 

what i need is a thing where when people join in a list or txt file it logs them in numral order from 1-10 in order of join

when the ircop whos running the helpdesk does a command of /who the script reads and lists from the list the people who to help like

/who

1.Nick

2.Nick

3.Nick

etc etc if you know what i mean.

 

if any1 whos really good can help me with this it would be much appreciated. thanks a ton.

 

unsure.gif

 

oh yea when it shows the list of people on the /who command it lists them from order logged/joined the channel

Edited Sep 29, 2004 1:34 PM by DigitalX

Just wanna confirm what you want to be done before I try n code anything...

1) When someone joins the room and isn't in the text list already they get added to the bottom of the list.

2) Using an alias you want the (first) ten people on the list to be listed in the form of /who (ie: /who for each of the ten)

If that's the case, wouldn't it be better to have all of the nicknames (excluding voiced or above) listed?

Also, if a person leaves a MSNChat helpdesk their position is reset to the bottom of the list when they rejoin, to prevent having to scan the room each time to see if the user's still there. Would that be a better option?

 

It's really simple to do, I just wanna check exactly what you wanted.

 


on *:join:#: {

if ($nick != $me) {

var %numeral = 0

inc %numeral

if (%numeral > 25) { set %numeral 0 }

./auser NickHelpList 12,1 %numeral $nick

}

}

alias do.HelpNicks {

var %ul = $ulist(*,NickHelpList,0), %i = 0

while (%i < %ul) {

inc %i

echo -a 7,14 $ulist(*,NickHelpList,%i)

}

}

alias 2help {

echo -a 12,0 Nicks To Help:

$do.HelpNicks

}

[code=auto:0]

 

Use /2help to list the names.

 

it isnt finished yet, I thought I'd let you do the on *:part and what not........ Hope it helps.

 

-Crash

 

\\=========//

CRASH

\\==============//

on *:join:#: { 
 if ($nick != $me) { 
   var %numeral = 0 
   inc %numeral
   if (%numeral > 25) { set %numeral 0 }

It would never be more than 1 so why bother using that if statement?

Using that code, each time a user joins it sets %numeral as 0 then increases it to 1. wink.gif

Edited Sep 29, 2004 7:18 PM by Cleric xtx

 

yea what i want is something that logs all users who join in numeral order they join it dosent have to be 10 but any amount at the highest and yea when they leave it removes them from the list and adds them to the bottom again and when the ircop does /who its echos in the window a list of the users to help in order they joined. much thanks if you can do it cleric cheers.gif

 

id also like to see if this is right but i need to change it to whisper i forgot how lol_sign.gif

on *:JOIN:#roomname:*: { write -a log.txt $nick | notice $nick Hey there is $nick(#,0) ppl in the room. Your are $calc($nick(#,0) + 1) }

Edited Sep 30, 2004 4:00 AM by DigitalX

well i tried......... im fairly new at scripting for irc.... you know that cleric. i know that would work though if i changed a few things.....

 

\\=========//

CRASH

\\==============//

on *:join:#: { 
 if ($nick != $me) {  
   ./auser NickHelpList $replace($nick,$chr(32),-)
 }
}
on *:part:#: { 
 if ($nick != $me) { 
   ./ruser NickHelpList $replace($nick,$chr(32),-)
 }
}
alias do.HelpNicks { 
 var %ul = $ulist(*,NickHelpList,0), %i = 0
 while (%i < %ul) {
   inc %i
   echo -a 7,14 %i $+ . $ulist(*,NickHelpList,%i)
 }
}
alias 2help { 
 echo -a 12,0 Nicks To Help:
 $do.HelpNicks 
}

 

that should work. On join it adds them to the list. On part it removes them.

if they join again, they will be at the end of the list just as if they joined for the first time.

 

To use it - paste it in your remotes and then in the chatroom type /2help

and it will list the nicks in order they entered the room.

 

NOTE: You can change the 2help command to anything you want ,

I would advise you not to mess with anything else, except for the text colors.

Colors = 7,14 Orange Text Grey Background 12,0 Blue Text White Background

 

BTW notice is /privmsg or /notice

 

 

Crash -----

 

\\=========//

CRASH

\\==============//

crash u can help me if you know how to write a whisper command could you do this to whisper

 

on *:JOIN:#roomname:*: { write -a log.txt $nick | notice $nick Hey there is $nick(#,0) ppl in the room. Your are $calc($nick(#,0) + 0) . Please have your question ready for host. If you need basic FAQ help whisper !menu to me. } 

Edited Sep 30, 2004 4:21 AM by DigitalX

on *:JOIN:#: { write -a log.txt $nick | //privmsg $nick Hey there is $nick(#,0) ppl in the room. Your are $calc($nick(#,0) + 0) . Please have your question ready for the host. If you need basic FAQ help whisper !menu to me. } 

 

That should do it.

 

Did you use my helpdesk code?

 

\\=========//

CRASH

\\==============//

thanks, yes i did i tryed it out but theres a bit where if someone changes there nick while in the channel they stay logged. im not sure how to fix that lol_sign.gifnotworking.gif

on *:join:#:{
 if (helpdesk !isin $chan) halt
 if ($nick !isvo $chan) && ($nick !isin $read(helpdesk.txt)) {
   write -a helpdesk.txt $nick
 }
 if ($nick == $me) {
   var %a = 1
   while ($nick($chan,0,r) >= %a) {
     write -a helpdesk.txt $nick($chan,%a,r)
     inc %a
   }
   echo -a All spectators have been added to the list
 }
}
on *:nick:{
 if ($nick isin $read(helpdesk.txt)) {
   write -s $+ $nick helpdesk.txt $newnick
 }
}
on *:part:#:{
 if ($nick isin $read(helpdesk.txt)) { write -ds $+ $nick helpdesk.txt }
}
on *:kick:#:{
 if ($knick isin $read(helpdesk.txt)) { write -ds $+ $nick helpdesk.txt }
}
on *:voice:#:{
 if ($nick isin $read(helpdesk.txt)) { write -ds $+ $nick helpdesk.txt }
}
alias hdvoice {
 :hop
 if ($read(helpdesk.txt,1) !ison $chan) { write -d1 helpdesk.txt | goto hop }
 mode $chan +v $read(helpdesk.txt,1)
 msg $chan Your helpdesk message here
 write -d1 helpdesk.txt
}
alias hdwho {
 window -ak0 @HDwho
 .enable #hdwho
 var %a = 1
 while (%a <= 10) { echo @HDwho %a $+ : | who $read(helpdesk.txt,%a) | inc %a }
 .disable #hdwho
}
#hdwho off
raw 302:*:{ echo @HDwho $1- }
raw 315:*:{ echo @HDwho $1- | echo @HDwho - }
#hdwho end

menu channel {
Helpdesk options
.Voice the next person:/hdvoice
.List /who for the first 10 specs:/hdwho
}

That covers it all and even comes with a handy lil channel popup tongue.gif

You'll need to edit "helpdesk" on the second line to your helpdesk's channel name and under the hdvoice alias change the message to whatever you want.

* If someone leaves then they will be removed from the list

* If you join the room with spectators and the helpdesk list is blank the spectators will be added alphabetically

* When someone changes their nickname it'll be automatically changed in the list

* If by some chance a nickname is in the list but not in the channel, it will erase the nick before you try voicing the next person in line

 

Obviously, any probs let me know smile.gif

 

Me a expert, I will help you.. tongue.gif

 

 

lol_sign.gif

rofl @ nita.....

 

Thanks clreic its works great smile.gif

a little modification. how do you make it so it don't add people that have ' in their name?

if (' isin $nick) halt

My code does NOT have bugs. It just develops random features.

Yes, what Ozzy_10 gave is good, or you can use

 

if ($chr(39) isin $nick) halt

 

Both codes should work just as good. The reason I use $chr's is that mirc seems to handle them a bit better for some reason.

for some reason ' is one of the few you dont need to convert

My code does NOT have bugs. It just develops random features.

because im using this addon on my bot i have made for a helpdesk, should i use

if (' isin %nickname)

or is there another way?

Yes,

if (' isin %nickname)

should do as long as you set the variable for %nickname

Edited Nov 13, 2004 6:20 PM by Warrior124

i am making a bot for a helpdesk. i'm having problems with the code i am trying to use. i want it to

- give a user an estimated waiting time when they join

- write to a text file an order of all the users in the helpdesk

- have a popup to voice the next person in the order

 

the code below is what i have and isnt working properly notworking.gif

alias helpbot { sockopen helpbot mxt-networkz.ircxpro.com 6667 }
on *:sockopen:helpbot:{
 sockwrite -n helpbot IRCX
 sockwrite -n helpbot NICK HelpMeBot
 sockwrite -n helpbot USER HelpMe_Bot HelpMe_Bot HelpMe_Bot:HelpDesk HelpMe_Bot
}
on *:sockread:helpbot:{
 sockread %helpbot
 tokenize 32 %helpbot
 set %nickname $remove($mid($1,2,$calc($pos($1,!,1) -1)),!)
 if ($1 == PING) { sockwrite -n helpbot PONG }
 if ($2 == 001) {
   sockwrite -n helpbot OPER **** ****
   sockwrite -n helpbot NICK 'HelpMe_Bot
   sockwrite -n helpbot JOIN #HelpDesk
 }
 if ($2 == PRIVMSG) && ($3 == 'HelpMe_Bot) && ($remove($4,:) == !Help) {
   sockwrite -n helpbot PRIVMSG %nickname :We have provided a list of help commands. Type the command for more information.
   sockwrite -n helpbot PRIVMSG %nickname :!Apply_Sysop
   sockwrite -n helpbot PRIVMSG %nickname :!Website
   sockwrite -n helpbot PRIVMSG %nickname :!Que
   sockwrite -n helpbot PRIVMSG %nickname :!Sysops
   sockwrite -n helpbot PRIVMSG %nickname :Thank you for using me. If your question is not above, please wait for an operator to assist you.
 }
 if ($2 == PRIVMSG) && ($3 == 'HelpMe_Bot) && ($remove($4,:) == !Apply_Sysop) {
   sockwrite -n helpbot PRIVMSG %nickname :Sysop Information Unavaliable.
 }
 if ($2 == PRIVMSG) && ($3 == 'HelpMe_Bot) && ($remove($4,:) == !Website) {
   sockwrite -n helpbot PRIVMSG %nickname :Visit us at http://mxt-networkz.com.
 }
 if ($2 == PRIVMSG) && ($3 == 'HelpMe_Bot) && ($remove($4,:) == !Que) {
   sockwrite -n helpbot PRIVMSG %nickname :Your estimated waiting time is $nick(#HelpDesk,0,+v) minutes.
 }
 if ($2 == PRIVMSG) && ($3 == 'HelpMe_Bot) && ($remove($4,:) == !Admins) {
 }
 if ($2 == JOIN) {
   if (' isin %nickname) { halt }
   sockwrite -n helpbot NOTICE %nickname :Hello and welcome to the HelpDesk. For a small list of faq's, whisper !Help to me.
   sockwrite -n helpbot NOTICE %nickname :Your estimated waiting time is $calc(%nickname(#HelpDesk,0,-v) +1) minutes.
   echo -a 4A new user has joined #HelpDesk. There nickname is %nickname $+ .
 }
 if (%nickname !isvo #HelpDesk) && (%nickname !isin $read(helpdesk.txt)) {
   write -a helpdesk.txt %nickname
 }
 if (%nickname == 'HelpMe_Bot) {
   var %a = 1
   while (%nickname(#HelpDesk,0,r) >= %a) {
     write -a helpdesk.txt %nickname(#HelpDesk,%a,r)
     inc %a
   }
 }
}
on *:nick:{
 if (%nickname isin $read(helpdesk.txt)) {
   write -s $+ %nickname helpdesk.txt $newnick
 }
}
on *:part:#HelpDesk:{
 if (%nickname isin $read(helpdesk.txt)) { write -ds $+ %nickname helpdesk.txt }
}
on *:kick:#HelpDesk:{
 if ($knick isin $read(helpdesk.txt)) { write -ds $+ %nickname helpdesk.txt }
}
on *:voice:#HelpDesk:{
 if (%nickname isin $read(helpdesk.txt)) { write -ds $+ %nickname helpdesk.txt }
}
alias hdvoice {
 :hop
 if ($read(helpdesk.txt,1) !ison #HelpDesk) { write -d1 helpdesk.txt | goto hop }
 sockwrite -n helpbot MODE #HelpDesk +v $read(helpdesk.txt,1)
 write -d1 helpdesk.txt
}
alias hdwho {
 window -ak0 @HDwho
 .enable #hdwho
 var %a = 1
 while (%a <= 10) { echo @HDwho %a $+ : | who $read(helpdesk.txt,%a) | inc %a }
 .disable #hdwho
}
#hdwho off
raw 302:*:{ echo @HDwho $1- }
raw 315:*:{ echo @HDwho $1- | echo @HDwho - }
#hdwho end

menu nicklist {
 Helpdesk options
 .Voice the next person:/hdvoice | msg #Hello $$1 $+ , welcome to the MXT Networkz HelpDesk. Please ask your question.
 .List First 10:/hdwho
 .Devoice:sockwrite -n helpbot MODE #HelpDesk -v $$1 | msg # Thank you $$1 for using the HelpDesk. Please feel free to return if you have any further questions.
}

 

can anyone fix it. thanks