Top

Query forwarding 1.1


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  6.6 (of 5 scores)
Date Added  Sep 29, 2007
Last Updated  Sep 30, 2007
Tags  accept  decline  query 

Introduction

Really simple query dialog that pops up when someone msgs you. It gives you the option to add a user to a friends list so that it automatically ignores the dialog if the user is in the friends list. You also have the option to remove a friend from the list by typing /del_nick (nick). Editing is fine, just give proper credit or a link to this snippet.

Grab the Code

dialog quer_ {
  title "Query forwarding"
  size -1 -1 105 62
  option dbu 
  box "", 1, 2 1 101 60, disable
  button "Yes", 4, 6 42 23 12
  button "No", 5, 29 42 23 12
  button "Add as friend", 6, 52 42 35 12
  edit "", 3, 7 21 87 17, read vsbar
  edit "", 2, 8 8 86 10, read
}
 
on *:dialog:quer_:init:0:{ 
  did -a $dname 2 Query from %nick_ 
  did -a $dname 3 Saying: %message_
}
 
on *:dialog:quer_:sclick:*:{ 
  if ($did = 4) {
    unset %message_
    dialog -x quer_ quer_
    query %nick_
    .msg %nick_ Your query has been accepted.
    unset %nick_
  }
  if ($did = 5) { 
    unset %message_
    dialog -x quer_ quer_
    .msg %nick_ Your query has been declined. 
    unset %nick_
  }
  if ($did = 6) { 
    if (!$hget(query)) hmake query 500 
    .hadd -m query %nick_ Friend.
    dialog -x quer_ quer_
    query %nick_
    .msg %nick_ Your query has been accepted and you are now added to the acceptance list.  
    unset %message_ %nick_
  }
}
 
on *:open:?:{ 
  if ($hget(query,$nick) = Friend.) halt 
  else {
    set %nick_ $nick
    set %message_ $1-
    dialog -m quer_ quer_
    .close -m %nick_ 
  }
}
 
alias del_nick {
  if ($hget(query)) { 
    if ($1) && ($hget(query,$1)) { 
      hdel query $1
    }
  }
}
 
on *:EXIT:{
  if ($hget(query)) { 
    hsave -o query query.hsh
  }
}
 
on *:START:{ 
 if (!$hget(query)) hmake query 500
 hload query query.hsh
}

Comments

  (21)  RSS
Akishoot
Comments: 139
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 29, 2007 10:38 pm
Nice work on this one. Very useful to me. :D 8/10 =)
Olliegod
Comments: 73
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 2:55 am
The list of friends will get destroyed when you exit mIRC. You will need to properly save them to file to prevent this, and then reload them from the file once mIRC starts again.

Or you could use a .ini or .txt file for this, seeing as it is something rather simple.
RubixCube
Comments: 51
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 8:08 am
Alright, added the events. Thanks Olliegod.
simplicity
Comments: 17
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 1:30 pm
Good job. 7/10
mountaindew
Comments: 1,826
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 6:23 pm
good idea to use a dialog with this, very simple

but it gives me error msg on load when it tries to load the hash

and also, why did you choose to make it notheme?
Akishoot
Comments: 139
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 6:28 pm
I removed dbu and notheme and put pixels, but the dialog shrunk a lot. So I just left it alone and set it back to dbu and notheme. Hehe. :]
mountaindew
Comments: 1,826
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 6:30 pm
i prefer taking the notheme out, idk why someone would like it that way!
RubixCube
Comments: 51
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 6:37 pm
Ah the notheme, I use a program called deditor because I am way too lazy. It pretty much includes that usually and I forgot to filter that out. =/

And about the load, the events were last minute and not tested. I am sorry for the efficiency of the snippet right now and will get to work immediately. Thank you all for your feedback.
RubixCube
Comments: 51
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 6:40 pm
Could you tell me the error message you received?
RubixCube
Comments: 51
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 6:46 pm
Akishoot
--------
Quote:

I removed dbu and notheme and put pixels, but the dialog shrunk a lot. So I just left it alone and set it back to dbu and notheme. Hehe. :]


That's what dbu does. It formats the dialog to fit your current screen resolution, if you removed it the size would be the actual provided.
mountaindew
Comments: 1,826
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 6:49 pm
Quote:

Could you tell me the error message you received?


* /hload: unable to open file 'C:\Documents and Settings\Dylan Kirby\Desktop\Trivia Bot\query.hsh' (line 68, script56.mrc)
RubixCube
Comments: 51
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 7:05 pm
Hmm, 'Botquery' shows that you have edited the snippet a bit. Perhaps the first hash name was loaded instead of Botquery? This snippet doesn't use botquery as it's hash name so it is most likely you forgot to change one of the names.
mountaindew
Comments: 1,826
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 7:33 pm
hmm thats wierd
Akishoot
Comments: 139
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 8:17 pm
Ahh thank you, RubixCube. I never did understand what dbu was for. xD
RubixCube
Comments: 51
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 8:19 pm
No problem Akishoot, glad to help.
Akishoot
Comments: 139
 
mIRC Snippet:  Query forwarding 1.1
Posted on Sep 30, 2007 8:22 pm
I made one of these awhile ago. It just didn't have the friend feature. Never bothered to post it on here, either. I think I will scurry around my folders and try to find it. :o
Olliegod
Comments: 73
 
mIRC Snippet:  Query forwarding 1.1
Posted on Oct 3, 2007 4:48 pm
The reason it produces an error message for /hload is because you do not check if the file exists before you load it.

Code:
if ($isfile(query.hsh)) hload query query.hsh
grapee
Comments: 1
 
mIRC Snippet:  Query forwarding 1.1
Posted on Apr 6, 2008 8:27 am
Nice job, man! It was really useful. I have one question though. Can you put something, a button maybe, for the friends' list? So we would know who's on our list. If you have updated this, kindly let me know. I would really appreciate that. Thanks a lot, dude! 10/10.

-grapee
smallvillefan28
Comments: 2
 
mIRC Snippet:  Query forwarding 1.1
Posted on Jun 28, 2008 2:20 pm
hmm nice script but is there away you can make a few changes like

1) make a blocked list

2) save it to mirc dir\defualts\scripts\query\friends.txt or mirc dir\defualts\scripts\query\blocked.txt

3) have it save them as *!*ident@*.domain (ie *!*someone@*.dial1.dallas3.level3.net) instead of Nick?
smallvillefan28
Comments: 2
 
mIRC Snippet:  Query forwarding 1.1
Posted on Jun 28, 2008 2:22 pm
sorry

2) save it to mirc dir defualts scripts query friends.txt or mirc dir defualts scripts query blocked.txt
EL
Comments: 1,125
 
mIRC Snippet:  Query forwarding 1.1
Posted on Jun 28, 2008 2:45 pm
@smallvillefan28,you can edit your first post now hawkee got a upgrade.`-.-ยด

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom