Jump to content

expert help


DigitalX

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...